• NeonSDK
  • NeonKUBE
Search Results for

    Show / Hide Table of Contents
    • Neon
      • Build
    • Neon.Blazor
      • BlazorHelper
      • BodyOutlet
      • ClientRenderContext
      • DOMRectReadOnly
      • EventHandlers
      • FileDownloader
      • HtmlElement
      • IRenderContext
      • IntersectionChangedEventArgs
      • IntersectionObserver
      • IntersectionObserverContext
      • MobileDetector
      • NeonBlazorExtensions
      • ServerRenderContext
      • SwipeDirection
      • SwipeHandler
    • Neon.Blazor.Analyzers
      • SvgGenerator
      • SvgGenerator.Svg
    • Neon.BuildInfo
      • ThisAssembly
      • ThisAssembly.Git
      • ThisAssembly.Git.BaseVersion
      • ThisAssembly.Git.SemVer
    • Neon.CSharp
      • CSharpHelper
      • CompilerErrorException
      • MetadataReferences
    • Neon.Cassandra
      • KeyspaceStatus
      • RowSetExtensions
      • SchemaManager
      • SchemaManagerException
      • SchemaStatus
      • SessionExtensions
    • Neon.Collections
      • ArgDictionary
      • Bits
      • IObjectDictionary
      • NiceDictionary<TKey, TValue>
      • ObjectDictionary
    • Neon.Common
      • AppDomainExtensions
      • Block
      • BlockArray
      • ByteEncoding
      • ByteUnits
      • CommandLine
      • CommandLine.OptionDefinition
      • CommandLine.Redactor
      • CpuArchitecture
      • Credentials
      • DateTimeExtensions
      • EnumExtensions
      • EnvironmentParser
      • EnvironmentParser.Parser<T>
      • EnvironmentParser.Validator<T>
      • EnvironmentParser.VariableSource
      • ExceptionExtensions
      • ExecuteException
      • ExecuteResponse
      • GlobPattern
      • HexDumpOption
      • HttpClientExtensions
      • HttpResponseMessageExtensions
      • IEnumerableExtensions
      • ILabeled
      • IOExtensions
      • IServiceContainer
      • IStaticDirectoryExtensions
      • LabelSelector
      • LabelSelectorOptions
      • LabelSelector<TItem>
      • NeonAssemblyExtensions
      • NeonExtendedHelper
      • NeonHelper
      • NetFramework
      • NewtonsoftExtensions
      • NotReadyException
      • ProcessExtensions
      • ProgramEntrypoint
      • ProgramEntrypointAsync
      • ProgramExitException
      • ProgramRunner
      • RandomExtensions
      • ReflectionExtensions
      • SemanticVersion
      • ServiceContainer
      • StaticZipOptions
      • StringBuilderExtensions
      • StringExtensions
      • Stub
      • Stub.Value
      • TaskExtensions
      • TimeSpanExtensions
      • ToolException
      • TriState
      • WeakEventController
      • WindowsEdition
      • WindowsFeatureStatus
      • YamlDotNetExtensions
    • Neon.Cryptography
      • AesCipher
      • CryptoExtensions
      • CryptoHelper
      • NeonVault
      • Wildcard
    • Neon.Csv
      • CsvReader
      • CsvTableReader
      • CsvTableWriter
      • CsvWriter
    • Neon.Data
      • DateTimeJsonConverter
      • DateTimeOffsetJsonConverter
      • IEnhancedJsonConverter
      • IGeneratedServiceClient
      • IPersistableType
      • IPersistableType<T>
      • IRoundtripData
      • IntegerEnumConverter<TEnum>
      • NotifyPropertyChanged
      • RoundtripDataFactory
      • RoundtripDataHelper
      • TimeSpanJsonConverter
      • VersionJsonConverter
    • Neon.Deployment
      • AwsCli
      • DeploymentException
      • DeploymentHelper
      • DownloadManifest
      • DownloadPart
      • DownloadProgressDelegate
      • DownloadProgressType
      • GitHub
      • GitHubActionsApi
      • GitHubPackage
      • GitHubPackageApi
      • GitHubPackageType
      • GitHubPackageVersion
      • GitHubPackageVisibility
      • GitHubReleaseApi
      • GitHubRepoPath
      • GitHubTagApi
      • IProfileClient
      • IProfileRequest
      • IProfileResponse
      • MaintainerProfile
      • NotifyClient
      • OnePassword
      • OnePasswordException
      • ProfileException
      • ProfileHandlerResult
      • ProfileRequest
      • ProfileResponse
      • ProfileServer
      • ProfileStatus
      • XenServer
    • Neon.Deployment.CodeSigning
      • AzureProfile
      • CodeSigner
      • UsbTokenProfile
    • Neon.Diagnostics
      • AssertException
      • ConfigExtensions
      • ConsoleJsonLogExporter
      • ConsoleJsonLogExporterOptions
      • ConsoleTextLogExporter
      • ConsoleTextLogExporterOptions
      • ExceptionInfo
      • FileLogExporter
      • FileLogExporterFormat
      • FileLogExporterOptions
      • LogAsTraceProcessor
      • LogAsTraceProcessorOptions
      • LogAttributeNames
      • LogAttributes
      • LogEvent
      • LogEventInterceptor
      • LoggerExtensions
      • NullLogger
      • TelemetryHub
      • TelemetrySpanEventNames
      • TelemetrySpanExtensions
    • Neon.Docker
      • DockerClient
      • DockerNetwork
      • DockerNetworkContainer
      • DockerNetworkIpam
      • DockerNode
      • DockerNodeManagerStatus
      • DockerResponse
      • DockerSettings
      • DockerVolume
      • NetworkCreateResponse
      • ServiceBindOptions
      • ServiceConfig
      • ServiceContainerSpec
      • ServiceCredentialSpec
      • ServiceDetails
      • ServiceDiscreteResourceSpec
      • ServiceDnsConfig
      • ServiceEndpoint
      • ServiceEndpointMode
      • ServiceEndpointPortConfig
      • ServiceEndpointSpec
      • ServiceFile
      • ServiceGenericResources
      • ServiceGlobalSchedulingMode
      • ServiceHealthCheck
      • ServiceIsolationMode
      • ServiceListResponse
      • ServiceLogDriver
      • ServiceMode
      • ServiceMount
      • ServiceMountBindPropagation
      • ServiceMountConsistency
      • ServiceMountType
      • ServiceNamedResourceSpec
      • ServiceNetwork
      • ServicePlacement
      • ServicePlacementPreferences
      • ServicePlacementSpreadSettings
      • ServicePlatform
      • ServicePortMode
      • ServicePortProtocol
      • ServicePrivileges
      • ServiceReplicatedSchedulingMode
      • ServiceResourceSettings
      • ServiceResources
      • ServiceRestartCondition
      • ServiceRestartPolicy
      • ServiceRollbackConfig
      • ServiceRollbackFailureAction
      • ServiceRollbackOrder
      • ServiceSELinuxContext
      • ServiceSchedulingMode
      • ServiceSecret
      • ServiceSpec
      • ServiceTaskTemplate
      • ServiceTmpfsOptions
      • ServiceUpdateConfig
      • ServiceUpdateFailureAction
      • ServiceUpdateOrder
      • ServiceUpdateState
      • ServiceUpdateStatus
      • ServiceVersion
      • ServiceVirtualIP
      • ServiceVolumeDriverConfig
      • ServiceVolumeOptions
      • VolumeListResponse
    • Neon.GitHub
      • GitExtensions
      • GitHubCredentials
      • GitHubRepo
      • LocalRepoApi
      • NoLocalRepositoryException
      • RemoteRepoApi
      • RemoteRepoBranchApi
      • RemoteRepoIssueApi
      • RemoteRepoIssueCommentApi
      • RemoteRepoPath
      • RemoteRepoReleaseApi
      • RemoteRepoTagApi
    • Neon.HyperV
      • HyperVClient
      • HyperVDriverType
      • HyperVException
      • NetAdapter
      • VirtualDrive
      • VirtualIPAddress
      • VirtualMachine
      • VirtualMachineNetworkAdapter
      • VirtualMachineState
      • VirtualNat
      • VirtualSwitch
      • VirtualSwitchType
    • Neon.IO
      • BlockStream
      • FixedLengthStream
      • IStaticDirectory
      • IStaticFile
      • LineEnding
      • LinuxPath
      • LinuxPermissions
      • PreprocessReader
      • RelayStream
      • StaticDirectoryBase
      • StaticFileBase
      • SubStream
      • TempFile
      • TempFolder
    • Neon.JsonConverters
      • JsonDateTimeConverter
      • JsonGenericConverter<T>
      • JsonNullableDateTimeConverter
    • Neon.ModelGen
      • ActionResult<T>
      • ApiVersion
      • ApiVersionAttribute
      • BodyStreamAttribute
      • ControllerValidationAttribute
      • DataModelAttribute
      • EnumMember
      • FromBodyAttribute
      • FromHeaderAttribute
      • FromQueryAttribute
      • FromRouteAttribute
      • GeneratedClientAttribute
      • GeneratedMethodAttribute
      • GeneratedParamAttribute
      • HashSourceAttribute
      • HttpAttribute
      • HttpDeleteAttribute
      • HttpGetAttribute
      • HttpHeadAttribute
      • HttpOptionsAttribute
      • HttpPatchAttribute
      • HttpPostAttribute
      • HttpPutAttribute
      • IActionResult
      • ModelGenerator
      • ModelGeneratorOutput
      • ModelGeneratorSettings
      • NoCodeGenAttribute
      • NoControllerValidationAttribute
      • PassAs
      • PersistableAttribute
      • PersistableKeyAttribute
      • RouteAttribute
      • ServiceModelAttribute
      • TargetAttribute
      • UxFrameworks
    • Neon.Net
      • HttpApiException
      • HttpException
      • JsonClient
      • JsonClientPayload
      • JsonResponse
      • Jwt
      • LocalHostSection
      • NetConst
      • NetHelper
      • NetworkCidr
      • NetworkConfiguration
      • NetworkException
      • NetworkPorts
      • Pinger
      • ReachableHost
      • ReachableHostMode
      • StreamDocument
    • Neon.Postgres
      • ConnectionExtensions
      • DatabaseStatus
      • PreparedCommand
      • ReaderAsyncEnumerator
      • ReaderEnumerator
      • ReaderExtensions
      • SchemaManager
      • SchemaManagerException
      • SchemaStatus
    • Neon.Retry
      • ExponentialRetryPolicy
      • IRetryPolicy
      • LinearRetryPolicy
      • NoRetryPolicy
      • RetryPolicy
      • RetryPolicyBase
      • RetryTransientArgs
      • TransientDetector
      • TransientException
    • Neon.Roslyn
      • DisplayFormat
      • DocumentationComment
      • DocumentationItem
      • MetadataLoadContext
      • RoslynAssembly
      • RoslynConstructorInfo
      • RoslynCustomAttributeData
      • RoslynExtensions
      • RoslynFieldInfo
      • RoslynMethodInfo
      • RoslynParameterInfo
      • RoslynPropertyInfo
      • RoslynType
      • SharedUtilities
    • Neon.Roslyn.Xunit
      • AdditionalSourceText
      • CompilationOptions
      • CompilationOptionsProvider
      • TestCompilation
      • TestCompilationAssertions
      • TestCompilationBuilder
      • TestCompilationBuilderExtensions
      • TestCompilationExtensions
    • Neon.SSH
      • CommandBundle
      • CommandFile
      • CommandResponse
      • HostFolders
      • IBashCommandFormatter
      • ILinuxSshProxy
      • LinuxDiskInfo
      • LinuxDiskPartition
      • LinuxSshProxy
      • LinuxSshProxy<TMetadata>
      • NamespaceDoc
      • RemoteCommandException
      • RunOptions
      • SshCredentials
      • SshExtensions
      • SshProxyException
    • Neon.Service
      • LogMetricsProcessor
      • MetricsMode
      • MetricsOptions
      • NeonService
      • NeonServiceOptions
      • NeonServiceStatus
      • OtelConfigExtensions
      • OtlpCollectorChecker
      • ProcessTerminator
      • ServiceApiContact
      • ServiceApiInfo
      • ServiceApiLicense
      • ServiceDependencies
      • ServiceDescription
      • ServiceEndpoint
      • ServiceEndpointProtocol
      • ServiceEndpoints
      • ServiceMap
    • Neon.SignalR
      • DependencyInjectionExtensions
      • DnsCache
      • GroupAction
      • GroupCommand
      • IDnsCache
      • Invocation
      • NatsHubLifetimeManager<THub>
      • ProxyConfig
      • ServiceCollectionExtensions
      • ServiceDiscovey
      • SignalrProxyMiddleware
      • SignalrProxyMiddlewareExtensions
      • TracerProviderBuilderExtensions
    • Neon.Tailwind
      • ClickOffEventHandler
      • ComponentEventArgs<TSender>
      • ComponentEventArgs<TSender, TEventArgs>
      • DisclosureState
      • EventHandlerComponentBase<TComponent>
      • HeadlessButton
      • HeadlessDialog
      • HeadlessDialogPanel
      • HeadlessDisclosure
      • HeadlessDisclosureButton
      • HeadlessDisclosurePanel
      • HeadlessListboxButton<TValue>
      • HeadlessListboxLabel<TValue>
      • HeadlessListboxOption<TValue>
      • HeadlessListboxOptions<TValue>
      • HeadlessListbox<TValue>
      • HeadlessMenu
      • HeadlessMenuButton
      • HeadlessMenuItem
      • HeadlessMenuItems
      • HeadlessSwitch
      • HeadlessSwitchGroup
      • HeadlessSwitchLabel
      • IPortalBinder
      • KeyDownEventHandler
      • KeyboardKey
      • ListboxFocus
      • ListboxState
      • MenuFocus
      • MenuState
      • Portal
      • PortalBinder
      • PortalContent
      • SearchAssistant
      • TailwindExtensions
      • Transition
      • TransitionGroup
      • TransitionState
    • Neon.Tasks
      • Async
      • AsyncAutoResetEvent
      • AsyncManualResetEvent
      • AsyncMutex
      • AsyncPeriodicTask
      • AsyncReaderWriterLock
      • AsyncReentrantMutex
      • AsyncTimer
      • IAsyncFuture
      • IAsyncFuture<T>
      • NonDisposableTask
      • NonDisposableTask<T>
      • SyncContext
      • SyncContextMode
    • Neon.Temporal
      • ActivityHelper
      • ActivityLogEnricher
      • TemporalEnricherTagNames
      • WorkflowLogEnricher
    • Neon.Time
      • GatedTimer
      • GoDuration
      • PolledTimer
      • RecurringTimer
      • RecurringTimerType
      • SysTime
      • TimeOfDay
    • Neon.WSL
      • Wsl2Proxy
    • Neon.Web
      • AesProtector
      • DataProtectionExtensions
      • NeonController
      • NeonControllerBase
      • RoundTripJsonInputFormatter
      • RoundTripJsonOutputFormatter
      • TracerProviderBuilderExtensions
      • WebHelper
    • Neon.WinTTY
      • ConsoleTTY
    • Neon.Windows
      • MEMORYSTATUSEX
      • PowerShellException
      • Win32
    • Neon.XenServer
      • IXenClient
      • XenClient
      • XenClient.MachineOperations
      • XenClient.StorageOperations
      • XenClient.TemplateOperations
      • XenException
      • XenHostInfo
      • XenObject
      • XenResponse
      • XenStorageRepository
      • XenTempIso
      • XenTemplate
      • XenVirtualDisk
      • XenVirtualMachine
      • XenVmPowerState
    • Neon.Xunit
      • AnsiblePlayResults
      • AnsiblePlayer
      • AnsibleTaskResult
      • AspNetFixture
      • BasicFixture
      • CodeFixture
      • CollectionComparer<T>
      • ComposedFixture
      • ContainerFixture
      • ContainerLimits
      • DockerComposeFixture
      • DockerFixture
      • DockerFixture.ConfigInfo
      • DockerFixture.ContainerInfo
      • DockerFixture.NetworkInfo
      • DockerFixture.SecretInfo
      • DockerFixture.ServiceInfo
      • DockerFixture.StackDefinition
      • DockerFixture.StackInfo
      • DockerFixture.StackService
      • EnvironmentFixture
      • HostsFixture
      • ITestFixture
      • IncompatibleServiceException
      • MaintainerFactAttribute
      • MaintainerTheoryAttribute
      • MockHttpServer
      • MockHttpServerExtensions
      • NatsFixture
      • NatsStreamingFixture
      • NeonServiceFixture<TService>
      • PlatformFactAttribute
      • RepeatAttribute
      • TargetPlatforms
      • TestArea
      • TestCollection
      • TestContext
      • TestFixture
      • TestFixtureStatus
      • TestHelper
      • TestHttpClient
      • TestOutputWriter
      • TestTrait
      • XunitExtensions
    • Neon.Xunit.YugaByte
      • YugaByteFixture
    • Neon.YugaByte
      • YugaByteHelper

    Class JsonClient

    Implements a light-weight JSON oriented HTTP client.

    Inheritance
    object
    JsonClient
    Namespace: Neon.Net
    Assembly: Neon.Common.dll
    Syntax
    public class JsonClient
    Remarks

    Use GetAsync(string, ArgDictionary, ArgDictionary, CancellationToken), PutAsync(string, object, ArgDictionary, ArgDictionary, CancellationToken), PostAsync(string, object, ArgDictionary, ArgDictionary, CancellationToken), DeleteAsync(string, ArgDictionary, ArgDictionary, CancellationToken), OptionsAsync(string, object, ArgDictionary, ArgDictionary, CancellationToken), HeadAsync(string, object, ArgDictionary, ArgDictionary, CancellationToken), or PatchAsync(string, object, ArgDictionary, ArgDictionary, CancellationToken) to perform HTTP operations that ensure that a non-error HTTP status code is returned by the servers.

    Use GetUnsafeAsync(string, ArgDictionary, ArgDictionary, CancellationToken), PutUnsafeAsync(string, object, ArgDictionary, ArgDictionary, CancellationToken), PostUnsafeAsync(string, object, ArgDictionary, ArgDictionary, CancellationToken), DeleteUnsafeAsync(string, ArgDictionary, ArgDictionary, CancellationToken), OptionsUnsafeAsync(string, object, ArgDictionary, ArgDictionary, CancellationToken), HeadUnsafeAsync(string, object, ArgDictionary, ArgDictionary, CancellationToken), or PatchUnsafeAsync(string, object, ArgDictionary, ArgDictionary, CancellationToken) to perform an HTTP without ensuring a non-error HTTP status code.

    This class can also handle retrying operations when transient errors are detected. Customize SafeRetryPolicy and/or UnsafeRetryPolicy by setting a IRetryPolicy implementation such as LinearRetryPolicy or ExponentialRetryPolicy.

    note

    This class initializes SafeRetryPolicy to a reasonable ExponentialRetryPolicy by default and UnsafeRetryPolicy to NoRetryPolicy. You can override the default retry policy for specific requests using the methods that take an IRetryPolicy as their first parameter.

    note

    The JsonClientPayload class can be used to customize both the Content-Type header and the actual payload uploaded with POST and PUT requests. This can be used for those special REST APIs that don't accept JSON payloads.

    All you need to do is construct a JsonClientPayload instance, specifying the value to be used as the Content-Type header and the payload data as text or a byte array and then pass this as the document parameter to the methods that upload content. The methods will recognize this special type and just send the specified data rather than attempting to serailize the document to JSON.

    Constructors

    JsonClient(HttpClient)

    Used in special situations (like ASP.NET Blazor) where a special HttpClient needs to be created and provided.

    Declaration
    public JsonClient(HttpClient httpClient)
    Parameters
    Type Name Description
    HttpClient httpClient

    The special HttpClient instance to be wrapped.

    JsonClient(HttpMessageHandler, bool)

    Used to construct a client for most situations, optionally specifying a custom HttpMessageHandler.

    Declaration
    public JsonClient(HttpMessageHandler handler = null, bool disposeHandler = false)
    Parameters
    Type Name Description
    HttpMessageHandler handler

    The optional message handler.

    bool disposeHandler

    Indicates whether the handler passed will be disposed automatically (defaults to false).

    Properties

    BaseAddress

    The default base Uri the client will use when relative URIs are specified for requests.

    Declaration
    public Uri BaseAddress { get; set; }
    Property Value
    Type Description
    Uri

    DefaultRequestHeaders

    Returns the base client's default request headers property to make it easy to customize request headers.

    Declaration
    public HttpRequestHeaders DefaultRequestHeaders { get; }
    Property Value
    Type Description
    HttpRequestHeaders

    DocumentType

    Specifies the MIME type to use posting or putting documents to the endpoint. This defaults to the standard application/json but some services may require custom values.

    Declaration
    public string DocumentType { get; set; }
    Property Value
    Type Description
    string

    HttpClient

    Returns the underlying HttpClient.

    Declaration
    public HttpClient HttpClient { get; }
    Property Value
    Type Description
    HttpClient

    SafeRetryPolicy

    The IRetryPolicy to be used to detect and retry transient network and HTTP errors for the safe methods. This defaults to ExponentialRetryPolicy with the transient detector function set to NetworkOrHttp(Exception).

    note

    You may set this to null to disable safe transient error retry.

    Declaration
    public IRetryPolicy SafeRetryPolicy { get; set; }
    Property Value
    Type Description
    IRetryPolicy

    Timeout

    The default base Uri the client will use when relative URIs are specified for requests.

    Declaration
    public TimeSpan Timeout { get; set; }
    Property Value
    Type Description
    TimeSpan

    UnsafeRetryPolicy

    The IRetryPolicy to be used to detect and retry transient network errors for the unsafe methods. This defaults to NoRetryPolicy.

    note

    You may set this to null to disable unsafe transient error retry.

    Declaration
    public IRetryPolicy UnsafeRetryPolicy { get; set; }
    Property Value
    Type Description
    IRetryPolicy

    Methods

    DeleteAsync(IRetryPolicy, string, ArgDictionary, ArgDictionary, CancellationToken)

    Performs an HTTP DELETE using a specific IRetryPolicy and ensuring that a success code was returned.

    Declaration
    public Task<JsonResponse> DeleteAsync(IRetryPolicy retryPolicy, string uri, ArgDictionary args = null, ArgDictionary headers = null, CancellationToken cancellationToken = default)
    Parameters
    Type Name Description
    IRetryPolicy retryPolicy

    The retry policy or null to disable retries.

    string uri

    The target URI.

    ArgDictionary args

    The optional query arguments.

    ArgDictionary headers

    The Optional HTTP headers.

    CancellationToken cancellationToken

    The optional CancellationToken.

    Returns
    Type Description
    Task<JsonResponse>

    The JsonResponse.

    Exceptions
    Type Condition
    SocketException

    Thrown for network connectivity issues.

    HttpException

    Thrown when the server responds with an HTTP error status code.

    DeleteAsync(string, ArgDictionary, ArgDictionary, CancellationToken)

    Performs an HTTP DELETE ensuring that a success code was returned.

    Declaration
    public Task<JsonResponse> DeleteAsync(string uri, ArgDictionary args = null, ArgDictionary headers = null, CancellationToken cancellationToken = default)
    Parameters
    Type Name Description
    string uri

    The target URI.

    ArgDictionary args

    The optional query arguments.

    ArgDictionary headers

    The Optional HTTP headers.

    CancellationToken cancellationToken

    The optional CancellationToken.

    Returns
    Type Description
    Task<JsonResponse>

    The JsonResponse.

    Exceptions
    Type Condition
    SocketException

    Thrown for network connectivity issues.

    HttpException

    Thrown when the server responds with an HTTP error status code.

    DeleteAsync<TResult>(string, ArgDictionary, ArgDictionary, CancellationToken)

    Performs an HTTP DELETE returning a specific type and ensuring that a success cxode was returned.

    Declaration
    public Task<TResult> DeleteAsync<TResult>(string uri, ArgDictionary args = null, ArgDictionary headers = null, CancellationToken cancellationToken = default)
    Parameters
    Type Name Description
    string uri

    The target URI.

    ArgDictionary args

    The optional query arguments.

    ArgDictionary headers

    The Optional HTTP headers.

    CancellationToken cancellationToken

    The optional CancellationToken.

    Returns
    Type Description
    Task<TResult>

    The JsonResponse.

    Type Parameters
    Name Description
    TResult

    The desired result type.

    Exceptions
    Type Condition
    SocketException

    Thrown for network connectivity issues.

    HttpException

    Thrown when the server responds with an HTTP error status code.

    DeleteUnsafeAsync(IRetryPolicy, string, ArgDictionary, ArgDictionary, CancellationToken)

    Performs an HTTP DELETE using a specific IRetryPolicy and without ensuring that a success code was returned.

    Declaration
    public Task<JsonResponse> DeleteUnsafeAsync(IRetryPolicy retryPolicy, string uri, ArgDictionary args = null, ArgDictionary headers = null, CancellationToken cancellationToken = default)
    Parameters
    Type Name Description
    IRetryPolicy retryPolicy

    The retry policy or null to disable retries.

    string uri

    The target URI.

    ArgDictionary args

    The optional query arguments.

    ArgDictionary headers

    The Optional HTTP headers.

    CancellationToken cancellationToken

    The optional CancellationToken.

    Returns
    Type Description
    Task<JsonResponse>

    The JsonResponse.

    Exceptions
    Type Condition
    SocketException

    Thrown for network connectivity issues.

    DeleteUnsafeAsync(string, ArgDictionary, ArgDictionary, CancellationToken)

    Performs an HTTP DELETE without ensuring that a success code was returned.

    Declaration
    public Task<JsonResponse> DeleteUnsafeAsync(string uri, ArgDictionary args = null, ArgDictionary headers = null, CancellationToken cancellationToken = default)
    Parameters
    Type Name Description
    string uri

    The target URI.

    ArgDictionary args

    The optional query arguments.

    ArgDictionary headers

    The Optional HTTP headers.

    CancellationToken cancellationToken

    The optional CancellationToken.

    Returns
    Type Description
    Task<JsonResponse>

    The JsonResponse.

    Exceptions
    Type Condition
    SocketException

    Thrown for network connectivity issues.

    Dispose()

    Releases all resources associated with the instance.

    Declaration
    public void Dispose()

    Dispose(bool)

    Releases all associated resources.

    Declaration
    protected virtual void Dispose(bool disposing)
    Parameters
    Type Name Description
    bool disposing

    Pass true if we're disposing, false if we're finalizing.

    ~JsonClient()

    Finalizer.

    Declaration
    protected ~JsonClient()

    GetAsync(IRetryPolicy, string, ArgDictionary, ArgDictionary, CancellationToken)

    Performs an HTTP GET using a specific IRetryPolicy" and ensuring that a success code was returned.

    Declaration
    public Task<JsonResponse> GetAsync(IRetryPolicy retryPolicy, string uri, ArgDictionary args = null, ArgDictionary headers = null, CancellationToken cancellationToken = default)
    Parameters
    Type Name Description
    IRetryPolicy retryPolicy

    The retry policy or null to disable retries.

    string uri

    The target URI.

    ArgDictionary args

    The optional query arguments.

    ArgDictionary headers

    The Optional HTTP headers.

    CancellationToken cancellationToken

    The optional CancellationToken.

    Returns
    Type Description
    Task<JsonResponse>

    The JsonResponse.

    Exceptions
    Type Condition
    SocketException

    Thrown for network connectivity issues.

    HttpException

    Thrown when the server responds with an HTTP error status code.

    GetAsync(string, ArgDictionary, ArgDictionary, CancellationToken)

    Performs an HTTP GET ensuring that a success code was returned.

    Declaration
    public Task<JsonResponse> GetAsync(string uri, ArgDictionary args = null, ArgDictionary headers = null, CancellationToken cancellationToken = default)
    Parameters
    Type Name Description
    string uri

    The target URI.

    ArgDictionary args

    The optional query arguments.

    ArgDictionary headers

    The Optional HTTP headers.

    CancellationToken cancellationToken

    The optional CancellationToken.

    Returns
    Type Description
    Task<JsonResponse>

    The JsonResponse.

    Exceptions
    Type Condition
    SocketException

    Thrown for network connectivity issues.

    HttpException

    Thrown when the server responds with an HTTP error status code.

    GetAsync<TResult>(string, ArgDictionary, ArgDictionary, CancellationToken)

    Performs an HTTP GET returning a specific type and ensuring that a success code was returned.

    Declaration
    public Task<TResult> GetAsync<TResult>(string uri, ArgDictionary args = null, ArgDictionary headers = null, CancellationToken cancellationToken = default)
    Parameters
    Type Name Description
    string uri

    The target URI.

    ArgDictionary args

    The optional query arguments.

    ArgDictionary headers

    The Optional HTTP headers.

    CancellationToken cancellationToken

    The optional CancellationToken.

    Returns
    Type Description
    Task<TResult>

    The JsonResponse.

    Type Parameters
    Name Description
    TResult

    The desired result type.

    Exceptions
    Type Condition
    SocketException

    Thrown for network connectivity issues.

    HttpException

    Thrown when the server responds with an HTTP error status code.

    GetUnsafeAsync(IRetryPolicy, string, ArgDictionary, ArgDictionary, CancellationToken)

    Performs an HTTP GET using a specific IRetryPolicy and without ensuring that a success code was returned.

    Declaration
    public Task<JsonResponse> GetUnsafeAsync(IRetryPolicy retryPolicy, string uri, ArgDictionary args = null, ArgDictionary headers = null, CancellationToken cancellationToken = default)
    Parameters
    Type Name Description
    IRetryPolicy retryPolicy

    The retry policy or null to disable retries.

    string uri

    The target URI.

    ArgDictionary args

    The optional query arguments.

    ArgDictionary headers

    The Optional HTTP headers.

    CancellationToken cancellationToken

    The optional CancellationToken.

    Returns
    Type Description
    Task<JsonResponse>

    The JsonResponse.

    Exceptions
    Type Condition
    SocketException

    Thrown for network connectivity issues.

    GetUnsafeAsync(string, ArgDictionary, ArgDictionary, CancellationToken)

    Performs an HTTP GET without ensuring that a success code was returned.

    Declaration
    public Task<JsonResponse> GetUnsafeAsync(string uri, ArgDictionary args = null, ArgDictionary headers = null, CancellationToken cancellationToken = default)
    Parameters
    Type Name Description
    string uri

    The target URI.

    ArgDictionary args

    The optional query arguments.

    ArgDictionary headers

    The Optional HTTP headers.

    CancellationToken cancellationToken

    The optional CancellationToken.

    Returns
    Type Description
    Task<JsonResponse>

    The JsonResponse.

    Exceptions
    Type Condition
    SocketException

    Thrown for network connectivity issues.

    HeadAsync(IRetryPolicy, string, object, ArgDictionary, ArgDictionary, CancellationToken)

    Performs an HTTP HEAD using a specific IRetryPolicy and ensuring that a success code was returned.

    Declaration
    public Task HeadAsync(IRetryPolicy retryPolicy, string uri, object document = null, ArgDictionary args = null, ArgDictionary headers = null, CancellationToken cancellationToken = default)
    Parameters
    Type Name Description
    IRetryPolicy retryPolicy

    The retry policy or null to disable retries.

    string uri

    The target URI.

    object document

    The optional object to be uploaded as the request payload. This may be JSON text, a plain old object that will be serialized as JSON or a StreamDocument to upload body data from a Stream.

    ArgDictionary args

    The optional query arguments.

    ArgDictionary headers

    The Optional HTTP headers.

    CancellationToken cancellationToken

    The optional CancellationToken.

    Returns
    Type Description
    Task

    The tracking Task.

    Exceptions
    Type Condition
    SocketException

    Thrown for network connectivity issues.

    HttpException

    Thrown when the server responds with an HTTP error status code.

    HeadAsync(string, object, ArgDictionary, ArgDictionary, CancellationToken)

    Performs an HTTP HEAD ensuring that a success code was returned.

    Declaration
    public Task HeadAsync(string uri, object document = null, ArgDictionary args = null, ArgDictionary headers = null, CancellationToken cancellationToken = default)
    Parameters
    Type Name Description
    string uri

    The target URI.

    object document

    The optional object to be uploaded as the request payload. This may be JSON text, a plain old object that will be serialized as JSON or a StreamDocument to upload body data from a Stream.

    ArgDictionary args

    The optional query arguments.

    ArgDictionary headers

    The Optional HTTP headers.

    CancellationToken cancellationToken

    The optional CancellationToken.

    Returns
    Type Description
    Task

    The tracking Task.

    Exceptions
    Type Condition
    SocketException

    Thrown for network connectivity issues.

    HttpException

    Thrown when the server responds with an HTTP error status code.

    HeadAsync<TResult>(string, object, ArgDictionary, ArgDictionary, CancellationToken)

    Performs an HTTP HEAD returning a specific type and ensuring that a success code was returned.

    Declaration
    public Task HeadAsync<TResult>(string uri, object document = null, ArgDictionary args = null, ArgDictionary headers = null, CancellationToken cancellationToken = default)
    Parameters
    Type Name Description
    string uri

    The target URI.

    object document

    The optional object to be uploaded as the request payload. This may be JSON text, a plain old object that will be serialized as JSON or a StreamDocument to upload body data from a Stream.

    ArgDictionary args

    The optional query arguments.

    ArgDictionary headers

    The Optional HTTP headers.

    CancellationToken cancellationToken

    The optional CancellationToken.

    Returns
    Type Description
    Task

    The tracking Task.

    Type Parameters
    Name Description
    TResult

    The desired result type.

    Exceptions
    Type Condition
    SocketException

    Thrown for network connectivity issues.

    HttpException

    Thrown when the server responds with an HTTP error status code.

    HeadUnsafeAsync(IRetryPolicy, string, object, ArgDictionary, ArgDictionary, CancellationToken)

    Performs an HTTP HEAD using a specific IRetryPolicy and without ensuring that a success code was returned.

    Declaration
    public Task<JsonResponse> HeadUnsafeAsync(IRetryPolicy retryPolicy, string uri, object document = null, ArgDictionary args = null, ArgDictionary headers = null, CancellationToken cancellationToken = default)
    Parameters
    Type Name Description
    IRetryPolicy retryPolicy

    The retry policy or null to disable retries.

    string uri

    The target URI.

    object document

    The optional object to be uploaded as the request payload. This may be JSON text, a plain old object that will be serialized as JSON or a StreamDocument to upload body data from a Stream.

    ArgDictionary args

    The optional query arguments.

    ArgDictionary headers

    The Optional HTTP headers.

    CancellationToken cancellationToken

    The optional CancellationToken.

    Returns
    Type Description
    Task<JsonResponse>

    The JsonResponse.

    Exceptions
    Type Condition
    SocketException

    Thrown for network connectivity issues.

    HeadUnsafeAsync(string, object, ArgDictionary, ArgDictionary, CancellationToken)

    Performs an HTTP HEAD without ensuring that a success code was returned.

    Declaration
    public Task<JsonResponse> HeadUnsafeAsync(string uri, object document = null, ArgDictionary args = null, ArgDictionary headers = null, CancellationToken cancellationToken = default)
    Parameters
    Type Name Description
    string uri

    The target URI.

    object document

    The optional object to be uploaded as the request payload. This may be JSON text, a plain old object that will be serialized as JSON or a StreamDocument to upload body data from a Stream.

    ArgDictionary args

    The optional query arguments.

    ArgDictionary headers

    The Optional HTTP headers.

    CancellationToken cancellationToken

    The optional CancellationToken.

    Returns
    Type Description
    Task<JsonResponse>

    The JsonResponse.

    Exceptions
    Type Condition
    SocketException

    Thrown for network connectivity issues.

    OptionsAsync(IRetryPolicy, string, object, ArgDictionary, ArgDictionary, CancellationToken)

    Performs an HTTP OPTIONS using a specific IRetryPolicy and ensuring that a success code was returned.

    Declaration
    public Task<JsonResponse> OptionsAsync(IRetryPolicy retryPolicy, string uri, object document = null, ArgDictionary args = null, ArgDictionary headers = null, CancellationToken cancellationToken = default)
    Parameters
    Type Name Description
    IRetryPolicy retryPolicy

    The retry policy or null to disable retries.

    string uri

    The target URI.

    object document

    The optional object to be uploaded as the request payload. This may be JSON text, a plain old object that will be serialized as JSON or a StreamDocument to upload body data from a Stream.

    ArgDictionary args

    The optional query arguments.

    ArgDictionary headers

    The Optional HTTP headers.

    CancellationToken cancellationToken

    The optional CancellationToken.

    Returns
    Type Description
    Task<JsonResponse>

    The JsonResponse.

    Exceptions
    Type Condition
    SocketException

    Thrown for network connectivity issues.

    HttpException

    Thrown when the server responds with an HTTP error status code.

    OptionsAsync(string, object, ArgDictionary, ArgDictionary, CancellationToken)

    Performs an HTTP OPTIONS ensuring that a success code was returned.

    Declaration
    public Task<JsonResponse> OptionsAsync(string uri, object document = null, ArgDictionary args = null, ArgDictionary headers = null, CancellationToken cancellationToken = default)
    Parameters
    Type Name Description
    string uri

    The target URI.

    object document

    The optional object to be uploaded as the request payload. This may be JSON text, a plain old object that will be serialized as JSON or a StreamDocument to upload body data from a Stream.

    ArgDictionary args

    The optional query arguments.

    ArgDictionary headers

    The Optional HTTP headers.

    CancellationToken cancellationToken

    The optional CancellationToken.

    Returns
    Type Description
    Task<JsonResponse>

    The JsonResponse.

    Exceptions
    Type Condition
    SocketException

    Thrown for network connectivity issues.

    HttpException

    Thrown when the server responds with an HTTP error status code.

    OptionsAsync<TResult>(string, object, ArgDictionary, ArgDictionary, CancellationToken)

    Performs an HTTP OPTIONS returning a specific type and ensuring that a success code was returned.

    Declaration
    public Task<TResult> OptionsAsync<TResult>(string uri, object document = null, ArgDictionary args = null, ArgDictionary headers = null, CancellationToken cancellationToken = default)
    Parameters
    Type Name Description
    string uri

    The target URI.

    object document

    The optional object to be uploaded as the request payload. This may be JSON text, a plain old object that will be serialized as JSON or a StreamDocument to upload body data from a Stream.

    ArgDictionary args

    The optional query arguments.

    ArgDictionary headers

    The Optional HTTP headers.

    CancellationToken cancellationToken

    The optional CancellationToken.

    Returns
    Type Description
    Task<TResult>

    The JsonResponse.

    Type Parameters
    Name Description
    TResult

    The desired result type.

    Exceptions
    Type Condition
    SocketException

    Thrown for network connectivity issues.

    HttpException

    Thrown when the server responds with an HTTP error status code.

    OptionsUnsafeAsync(IRetryPolicy, string, object, ArgDictionary, ArgDictionary, CancellationToken)

    Performs an HTTP OPTIONS using a specific IRetryPolicy and without ensuring that a success code was returned.

    Declaration
    public Task<JsonResponse> OptionsUnsafeAsync(IRetryPolicy retryPolicy, string uri, object document = null, ArgDictionary args = null, ArgDictionary headers = null, CancellationToken cancellationToken = default)
    Parameters
    Type Name Description
    IRetryPolicy retryPolicy

    The retry policy or null to disable retries.

    string uri

    The target URI.

    object document

    The optional object to be uploaded as the request payload. This may be JSON text, a plain old object that will be serialized as JSON or a StreamDocument to upload body data from a Stream.

    ArgDictionary args

    The optional query arguments.

    ArgDictionary headers

    The Optional HTTP headers.

    CancellationToken cancellationToken

    The optional CancellationToken.

    Returns
    Type Description
    Task<JsonResponse>

    The JsonResponse.

    Exceptions
    Type Condition
    SocketException

    Thrown for network connectivity issues.

    OptionsUnsafeAsync(string, object, ArgDictionary, ArgDictionary, CancellationToken)

    Performs an HTTP OPTIONS without ensuring that a success code was returned.

    Declaration
    public Task<JsonResponse> OptionsUnsafeAsync(string uri, object document = null, ArgDictionary args = null, ArgDictionary headers = null, CancellationToken cancellationToken = default)
    Parameters
    Type Name Description
    string uri

    The target URI.

    object document

    The optional object to be uploaded as the request payload. This may be JSON text, a plain old object that will be serialized as JSON or a StreamDocument to upload body data from a Stream.

    ArgDictionary args

    The optional query arguments.

    ArgDictionary headers

    The Optional HTTP headers.

    CancellationToken cancellationToken

    The optional CancellationToken.

    Returns
    Type Description
    Task<JsonResponse>

    The JsonResponse.

    Exceptions
    Type Condition
    SocketException

    Thrown for network connectivity issues.

    PatchAsync(IRetryPolicy, string, object, ArgDictionary, ArgDictionary, CancellationToken)

    Performs an HTTP PATCH using a specific IRetryPolicy and ensuring that a success code was returned.

    Declaration
    public Task<JsonResponse> PatchAsync(IRetryPolicy retryPolicy, string uri, object document = null, ArgDictionary args = null, ArgDictionary headers = null, CancellationToken cancellationToken = default)
    Parameters
    Type Name Description
    IRetryPolicy retryPolicy

    The retry policy or null to disable retries.

    string uri

    The target URI.

    object document

    The optional object to be uploaded as the request payload. This may be JSON text, a plain old object that will be serialized as JSON or a StreamDocument to upload body data from a Stream.

    ArgDictionary args

    The optional query arguments.

    ArgDictionary headers

    The Optional HTTP headers.

    CancellationToken cancellationToken

    The optional CancellationToken.

    Returns
    Type Description
    Task<JsonResponse>

    The JsonResponse.

    Exceptions
    Type Condition
    SocketException

    Thrown for network connectivity issues.

    HttpException

    Thrown when the server responds with an HTTP error status code.

    PatchAsync(string, object, ArgDictionary, ArgDictionary, CancellationToken)

    Performs an HTTP PATCH ensuring that a success code was returned.

    Declaration
    public Task<JsonResponse> PatchAsync(string uri, object document = null, ArgDictionary args = null, ArgDictionary headers = null, CancellationToken cancellationToken = default)
    Parameters
    Type Name Description
    string uri

    The target URI.

    object document

    The optional object to be uploaded as the request payload. This may be JSON text, a plain old object that will be serialized as JSON or a StreamDocument to upload body data from a Stream.

    ArgDictionary args

    The optional query arguments.

    ArgDictionary headers

    The Optional HTTP headers.

    CancellationToken cancellationToken

    The optional CancellationToken.

    Returns
    Type Description
    Task<JsonResponse>

    The JsonResponse.

    Exceptions
    Type Condition
    SocketException

    Thrown for network connectivity issues.

    HttpException

    Thrown when the server responds with an HTTP error status code.

    PatchAsync<TResult>(string, object, ArgDictionary, ArgDictionary, CancellationToken)

    Performs an HTTP PATCH returning a specific type and ensuring that a success code was returned.

    Declaration
    public Task<TResult> PatchAsync<TResult>(string uri, object document = null, ArgDictionary args = null, ArgDictionary headers = null, CancellationToken cancellationToken = default)
    Parameters
    Type Name Description
    string uri

    The target URI.

    object document

    The optional object to be uploaded as the request payload. This may be JSON text, a plain old object that will be serialized as JSON or a StreamDocument to upload body data from a Stream.

    ArgDictionary args

    The optional query arguments.

    ArgDictionary headers

    The Optional HTTP headers.

    CancellationToken cancellationToken

    The optional CancellationToken.

    Returns
    Type Description
    Task<TResult>

    The JsonResponse.

    Type Parameters
    Name Description
    TResult

    The desired result type.

    Exceptions
    Type Condition
    SocketException

    Thrown for network connectivity issues.

    HttpException

    Thrown when the server responds with an HTTP error status code.

    PatchUnsafeAsync(IRetryPolicy, string, object, ArgDictionary, ArgDictionary, CancellationToken)

    Performs an HTTP PATCH using a specific IRetryPolicy and without ensuring that a success code was returned.

    Declaration
    public Task<JsonResponse> PatchUnsafeAsync(IRetryPolicy retryPolicy, string uri, object document = null, ArgDictionary args = null, ArgDictionary headers = null, CancellationToken cancellationToken = default)
    Parameters
    Type Name Description
    IRetryPolicy retryPolicy

    The retry policy or null to disable retries.

    string uri

    The target URI.

    object document

    The optional object to be uploaded as the request payload. This may be JSON text, a plain old object that will be serialized as JSON or a StreamDocument to upload body data from a Stream.

    ArgDictionary args

    The optional query arguments.

    ArgDictionary headers

    The Optional HTTP headers.

    CancellationToken cancellationToken

    The optional CancellationToken.

    Returns
    Type Description
    Task<JsonResponse>

    The JsonResponse.

    Exceptions
    Type Condition
    SocketException

    Thrown for network connectivity issues.

    PatchUnsafeAsync(string, object, ArgDictionary, ArgDictionary, CancellationToken)

    Performs an HTTP PATCH without ensuring that a success code was returned.

    Declaration
    public Task<JsonResponse> PatchUnsafeAsync(string uri, object document = null, ArgDictionary args = null, ArgDictionary headers = null, CancellationToken cancellationToken = default)
    Parameters
    Type Name Description
    string uri

    The target URI.

    object document

    The optional object to be uploaded as the request payload. This may be JSON text, a plain old object that will be serialized as JSON or a StreamDocument to upload body data from a Stream.

    ArgDictionary args

    The optional query arguments.

    ArgDictionary headers

    The Optional HTTP headers.

    CancellationToken cancellationToken

    The optional CancellationToken.

    Returns
    Type Description
    Task<JsonResponse>

    The JsonResponse.

    Exceptions
    Type Condition
    SocketException

    Thrown for network connectivity issues.

    PostAsync(IRetryPolicy, string, object, ArgDictionary, ArgDictionary, CancellationToken)

    Performs an HTTP POST using a specific IRetryPolicy and ensuring that a success code was returned.

    Declaration
    public Task<JsonResponse> PostAsync(IRetryPolicy retryPolicy, string uri, object document = null, ArgDictionary args = null, ArgDictionary headers = null, CancellationToken cancellationToken = default)
    Parameters
    Type Name Description
    IRetryPolicy retryPolicy

    The retry policy or null to disable retries.

    string uri

    The target URI.

    object document

    The optional object to be uploaded as the request payload. This may be JSON text, a plain old object that will be serialized as JSON or a StreamDocument to upload body data from a Stream.

    ArgDictionary args

    The optional query arguments.

    ArgDictionary headers

    The Optional HTTP headers.

    CancellationToken cancellationToken

    The optional CancellationToken.

    Returns
    Type Description
    Task<JsonResponse>

    The JsonResponse.

    Exceptions
    Type Condition
    SocketException

    Thrown for network connectivity issues.

    HttpException

    Thrown when the server responds with an HTTP error status code.

    PostAsync(string, object, ArgDictionary, ArgDictionary, CancellationToken)

    Performs an HTTP POST ensuring that a success code was returned.

    Declaration
    public Task<JsonResponse> PostAsync(string uri, object document = null, ArgDictionary args = null, ArgDictionary headers = null, CancellationToken cancellationToken = default)
    Parameters
    Type Name Description
    string uri

    The target URI.

    object document

    The optional object to be uploaded as the request payload. This may be JSON text, a plain old object that will be serialized as JSON or a StreamDocument to upload body data from a Stream.

    ArgDictionary args

    The optional query arguments.

    ArgDictionary headers

    The Optional HTTP headers.

    CancellationToken cancellationToken

    The optional CancellationToken.

    Returns
    Type Description
    Task<JsonResponse>

    The JsonResponse.

    Exceptions
    Type Condition
    SocketException

    Thrown for network connectivity issues.

    HttpException

    Thrown when the server responds with an HTTP error status code.

    PostAsync<TResult>(string, object, ArgDictionary, ArgDictionary, CancellationToken)

    Performs an HTTP POST returning a specific type and ensuring that a success code was returned.

    Declaration
    public Task<TResult> PostAsync<TResult>(string uri, object document = null, ArgDictionary args = null, ArgDictionary headers = null, CancellationToken cancellationToken = default)
    Parameters
    Type Name Description
    string uri

    The target URI.

    object document

    The optional object to be uploaded as the request payload. This may be JSON text, a plain old object that will be serialized as JSON or a StreamDocument to upload body data from a Stream.

    ArgDictionary args

    The optional query arguments.

    ArgDictionary headers

    The Optional HTTP headers.

    CancellationToken cancellationToken

    The optional CancellationToken.

    Returns
    Type Description
    Task<TResult>

    The JsonResponse.

    Type Parameters
    Name Description
    TResult

    The desired result type.

    Exceptions
    Type Condition
    SocketException

    Thrown for network connectivity issues.

    HttpException

    Thrown when the server responds with an HTTP error status code.

    PostUnsafeAsync(IRetryPolicy, string, object, ArgDictionary, ArgDictionary, CancellationToken)

    Performs an HTTP POST using a specific IRetryPolicy and without ensuring that a success code was returned.

    Declaration
    public Task<JsonResponse> PostUnsafeAsync(IRetryPolicy retryPolicy, string uri, object document = null, ArgDictionary args = null, ArgDictionary headers = null, CancellationToken cancellationToken = default)
    Parameters
    Type Name Description
    IRetryPolicy retryPolicy

    The retry policy or null to disable retries.

    string uri

    The target URI.

    object document

    The optional object to be uploaded as the request payload. This may be JSON text, a plain old object that will be serialized as JSON or a StreamDocument to upload body data from a Stream.

    ArgDictionary args

    The optional query arguments.

    ArgDictionary headers

    The Optional HTTP headers.

    CancellationToken cancellationToken

    The optional CancellationToken.

    Returns
    Type Description
    Task<JsonResponse>

    The JsonResponse.

    Exceptions
    Type Condition
    SocketException

    Thrown for network connectivity issues.

    PostUnsafeAsync(string, object, ArgDictionary, ArgDictionary, CancellationToken)

    Performs an HTTP POST without ensuring that a success code was returned.

    Declaration
    public Task<JsonResponse> PostUnsafeAsync(string uri, object document = null, ArgDictionary args = null, ArgDictionary headers = null, CancellationToken cancellationToken = default)
    Parameters
    Type Name Description
    string uri

    The target URI.

    object document

    The optional object to be uploaded as the request payload. This may be JSON text, a plain old object that will be serialized as JSON or a StreamDocument to upload body data from a Stream.

    ArgDictionary args

    The optional query arguments.

    ArgDictionary headers

    The Optional HTTP headers.

    CancellationToken cancellationToken

    The optional CancellationToken.

    Returns
    Type Description
    Task<JsonResponse>

    The JsonResponse.

    Exceptions
    Type Condition
    SocketException

    Thrown for network connectivity issues.

    PutAsync(IRetryPolicy, string, object, ArgDictionary, ArgDictionary, CancellationToken)

    Performs an HTTP PUT using a specific IRetryPolicy" and ensuring that a success code was returned.

    Declaration
    public Task<JsonResponse> PutAsync(IRetryPolicy retryPolicy, string uri, object document = null, ArgDictionary args = null, ArgDictionary headers = null, CancellationToken cancellationToken = default)
    Parameters
    Type Name Description
    IRetryPolicy retryPolicy

    The retry policy or null to disable retries.

    string uri

    The target URI.

    object document

    The optional object to be uploaded as the request payload. This may be JSON text, a plain old object that will be serialized as JSON or a StreamDocument to upload body data from a Stream.

    ArgDictionary args

    The optional query arguments.

    ArgDictionary headers

    The Optional HTTP headers.

    CancellationToken cancellationToken

    The optional CancellationToken.

    Returns
    Type Description
    Task<JsonResponse>

    The JsonResponse.

    Exceptions
    Type Condition
    SocketException

    Thrown for network connectivity issues.

    HttpException

    Thrown when the server responds with an HTTP error status code.

    PutAsync(string, object, ArgDictionary, ArgDictionary, CancellationToken)

    Performs an HTTP PUT ensuring that a success code was returned.

    Declaration
    public Task<JsonResponse> PutAsync(string uri, object document = null, ArgDictionary args = null, ArgDictionary headers = null, CancellationToken cancellationToken = default)
    Parameters
    Type Name Description
    string uri

    The target URI.

    object document

    The optional object to be uploaded as the request payload. This may be JSON text, a plain old object that will be serialized as JSON or a StreamDocument to upload body data from a Stream.

    ArgDictionary args

    The optional query arguments.

    ArgDictionary headers

    The Optional HTTP headers.

    CancellationToken cancellationToken

    The optional CancellationToken.

    Returns
    Type Description
    Task<JsonResponse>

    The JsonResponse.

    Exceptions
    Type Condition
    SocketException

    Thrown for network connectivity issues.

    HttpException

    Thrown when the server responds with an HTTP error status code.

    PutAsync<TResult>(string, object, ArgDictionary, ArgDictionary, CancellationToken)

    Performs an HTTP PUT returning a specific type and ensuring that a success code was returned.

    Declaration
    public Task<TResult> PutAsync<TResult>(string uri, object document = null, ArgDictionary args = null, ArgDictionary headers = null, CancellationToken cancellationToken = default)
    Parameters
    Type Name Description
    string uri

    The target URI.

    object document

    The optional object to be uploaded as the request payload. This may be JSON text, a plain old object that will be serialized as JSON or a StreamDocument to upload body data from a Stream.

    ArgDictionary args

    The optional query arguments.

    ArgDictionary headers

    The Optional HTTP headers.

    CancellationToken cancellationToken

    The optional CancellationToken.

    Returns
    Type Description
    Task<TResult>

    The JsonResponse.

    Type Parameters
    Name Description
    TResult

    The desired result type.

    Exceptions
    Type Condition
    SocketException

    Thrown for network connectivity issues.

    HttpException

    Thrown when the server responds with an HTTP error status code.

    PutUnsafeAsync(IRetryPolicy, string, object, ArgDictionary, ArgDictionary, CancellationToken)

    Performs an HTTP PUT using a specific IRetryPolicy" and without ensuring that a success code was returned.

    Declaration
    public Task<JsonResponse> PutUnsafeAsync(IRetryPolicy retryPolicy, string uri, object document = null, ArgDictionary args = null, ArgDictionary headers = null, CancellationToken cancellationToken = default)
    Parameters
    Type Name Description
    IRetryPolicy retryPolicy

    The retry policy or null to disable retries.

    string uri

    The target URI.

    object document

    The optional object to be uploaded as the request payload. This may be JSON text, a plain old object that will be serialized as JSON or a StreamDocument to upload body data from a Stream.

    ArgDictionary args

    The optional query arguments.

    ArgDictionary headers

    The Optional HTTP headers.

    CancellationToken cancellationToken

    The optional CancellationToken.

    Returns
    Type Description
    Task<JsonResponse>

    The JsonResponse.

    Exceptions
    Type Condition
    SocketException

    Thrown for network connectivity issues.

    PutUnsafeAsync(string, object, ArgDictionary, ArgDictionary, CancellationToken)

    Performs an HTTP PUT without ensuring that a success code was returned.

    Declaration
    public Task<JsonResponse> PutUnsafeAsync(string uri, object document = null, ArgDictionary args = null, ArgDictionary headers = null, CancellationToken cancellationToken = default)
    Parameters
    Type Name Description
    string uri

    The target URI.

    object document

    The optional object to be uploaded as the request payload. This may be JSON text, a plain old object that will be serialized as JSON or a StreamDocument to upload body data from a Stream.

    ArgDictionary args

    The optional query arguments.

    ArgDictionary headers

    The Optional HTTP headers.

    CancellationToken cancellationToken

    The optional CancellationToken.

    Returns
    Type Description
    Task<JsonResponse>

    The JsonResponse.

    Exceptions
    Type Condition
    SocketException

    Thrown for network connectivity issues.

    In this article
    Back to top © Copyright 2005-2023 by NEONFORGE LLC