• Articles
  • Api Documentation
Show / Hide Table of Contents
  • Dapplo.HttpExtensions
    • AuthorizationExtensions
    • HttpBehaviour
    • HttpBehaviourExtensions
    • HttpClientExtensions
    • HttpContentExtensions
    • HttpExtensionsGlobals
    • HttpRequestMessageConfiguration
    • HttpRequestMessageExtensions
    • HttpResponse
    • HttpResponse<TResponse, TErrorResponse>
    • HttpResponse<TResponse>
    • HttpResponseMessageExtensions
    • HttpResponseWithError<TErrorResponse>
    • IChangeableHttpBehaviour
    • IHttpBehaviour
    • IHttpContentConverter
    • IHttpRequestConfiguration
    • IHttpSettings
    • IJsonSerializer
    • MiscExtensions
    • UriActionExtensions
    • UriModifyExtensions
    • UriParseExtensions
  • Dapplo.HttpExtensions.ContentConverter
    • ByteArrayHttpContentConverter
    • DefaultJsonHttpContentConverter
    • DefaultJsonHttpContentConverterConfiguration
    • FormUriEncodedContentConverter
    • StreamHttpContentConverter
    • StringConfiguration
    • StringHttpContentConverter
    • SyndicationFeedHttpContentConverter
    • XDocumentHttpContentConverter
  • Dapplo.HttpExtensions.Extensions
    • EnumExtensions
    • HttpBehaviourExtensions
    • StringExtensions
    • TypeExtensions
  • Dapplo.HttpExtensions.Factory
    • HttpClientFactory
    • HttpContentFactory
    • HttpMessageHandlerFactory
    • HttpRequestMessageFactory
    • WebProxyFactory
  • Dapplo.HttpExtensions.JsonNet
    • JsonNetJsonSerializer
    • ReadOnlyConsideringContractResolver
  • Dapplo.HttpExtensions.JsonSimple
    • DataContractJsonSerializerStrategy
    • DefaultJsonHttpContentConverter
    • IJsonSerializerStrategy
    • JsonExtensionDataAttribute
    • PocoJsonSerializerStrategy
    • SimpleJson
    • SimpleJsonSerializer
  • Dapplo.HttpExtensions.Listener
    • HttpListenerContextExtensions
    • ListenerPortExtensions
    • UriHttpListenerExtensions
  • Dapplo.HttpExtensions.OAuth
    • AuthorizeModes
    • BaseOAuthSettings
    • GrantTypes
    • ICodeReceiverSettings
    • IOAuth1Token
    • IOAuth2Token
    • IOAuthCodeReceiver
    • OAuth1HttpBehaviour
    • OAuth1HttpBehaviourFactory
    • OAuth1HttpMessageHandler
    • OAuth1Parameters
    • OAuth1RequestConfiguration
    • OAuth1Settings
    • OAuth1SignatureTransports
    • OAuth1SignatureTypes
    • OAuth1Token
    • OAuth2HttpBehaviourFactory
    • OAuth2HttpMessageHandler
    • OAuth2Settings
    • OAuth2TokenResponse
    • OAuthExtensions
  • Dapplo.HttpExtensions.OAuth.CodeReceivers
    • EmbeddedBrowserCodeReceiver
  • Dapplo.HttpExtensions.OAuth.Desktop
    • OAuthLoginForm
  • Dapplo.HttpExtensions.Support
    • HttpPartAttribute
    • HttpParts
    • HttpRequestAttribute
    • HttpResponseAttribute
    • HttpSettings
    • MediaTypes
    • ProgressStream
    • ProgressStreamReport
  • Dapplo.HttpExtensions.SystemTextJson
    • SystemTextJsonSerializer
  • Dapplo.HttpExtensions.WinForms.ContentConverter
    • BitmapConfiguration
    • BitmapHttpContentConverter
  • Dapplo.HttpExtensions.Wpf.ContentConverter
    • BitmapSourceConfiguration
    • BitmapSourceHttpContentConverter

Class UriActionExtensions

Uri extension which perform an action

Inheritance
System.Object
UriActionExtensions
Inherited Members
System.Object.ToString()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
Namespace: Dapplo.HttpExtensions
Assembly: Dapplo.HttpExtensions.dll
Syntax
public static class UriActionExtensions

Methods

| Improve this Doc View Source

DeleteAsync(Uri, CancellationToken)

Method to Delete content

Declaration
public static Task DeleteAsync(this Uri uri, CancellationToken cancellationToken = null)
Parameters
Type Name Description
Uri uri

Uri to send the delete to

CancellationToken cancellationToken

CancellationToken

Returns
Type Description
Task

Task

| Improve this Doc View Source

DeleteAsync<TResponse>(Uri, CancellationToken)

Method to Delete content

Declaration
public static async Task<TResponse> DeleteAsync<TResponse>(this Uri uri, CancellationToken cancellationToken = null)
    where TResponse : class
Parameters
Type Name Description
Uri uri

Uri to send the delete to

CancellationToken cancellationToken

CancellationToken

Returns
Type Description
Task<TResponse>

TResponse

Type Parameters
Name Description
TResponse

the generic type to return the result into, use HttpContent or HttpResponseMessage to get those unprocessed

| Improve this Doc View Source

GetAsAsync<TResponse>(Uri, CancellationToken)

Get the response as the specified type

Declaration
public static async Task<TResponse> GetAsAsync<TResponse>(this Uri uri, CancellationToken cancellationToken = null)
    where TResponse : class
Parameters
Type Name Description
Uri uri

An Uri to specify the download location

CancellationToken cancellationToken

CancellationToken

Returns
Type Description
Task<TResponse>

TResponse

Type Parameters
Name Description
TResponse

Type to deserialize into

| Improve this Doc View Source

HeadAsync(Uri, CancellationToken)

Retrieve only the content headers, by using the HTTP HEAD method

Declaration
public static async Task<HttpContentHeaders> HeadAsync(this Uri uri, CancellationToken cancellationToken = null)
Parameters
Type Name Description
Uri uri

Uri to get HEAD for

CancellationToken cancellationToken

CancellationToken

Returns
Type Description
Task<System.Net.Http.Headers.HttpContentHeaders>

HttpContentHeaders

| Improve this Doc View Source

LastModifiedAsync(Uri, CancellationToken)

Get LastModified for a URI

Declaration
public static async Task<DateTimeOffset> LastModifiedAsync(this Uri uri, CancellationToken cancellationToken = null)
Parameters
Type Name Description
Uri uri

Uri

CancellationToken cancellationToken

CancellationToken

Returns
Type Description
Task<DateTimeOffset>

DateTime

| Improve this Doc View Source

PatchAsync(Uri, Object, CancellationToken)

Method to Patch content, ignore response

Declaration
public static async Task PatchAsync(this Uri uri, object content, CancellationToken cancellationToken = null)
Parameters
Type Name Description
Uri uri

Uri to patch to

System.Object content

Content to patch

CancellationToken cancellationToken

CancellationToken

Returns
Type Description
Task
| Improve this Doc View Source

PatchAsync<TResponse>(Uri, Object, CancellationToken)

Method to Patch content

Declaration
public static async Task<TResponse> PatchAsync<TResponse>(this Uri uri, object content, CancellationToken cancellationToken = null)
    where TResponse : class
Parameters
Type Name Description
Uri uri

Uri to patch to

System.Object content

Content to patch

CancellationToken cancellationToken

CancellationToken

Returns
Type Description
Task<TResponse>

TResponse

Type Parameters
Name Description
TResponse

the generic type to return the result into, use HttpContent or HttpResponseMessage to get those unprocessed

| Improve this Doc View Source

PostAsync(Uri, Object, CancellationToken)

Method to Post content, ignore response

Declaration
public static async Task PostAsync(this Uri uri, object content, CancellationToken cancellationToken = null)
Parameters
Type Name Description
Uri uri

Uri to post to

System.Object content

Content to post

CancellationToken cancellationToken

CancellationToken

Returns
Type Description
Task
| Improve this Doc View Source

PostAsync<TResponse>(Uri, Object, CancellationToken)

Method to Post content

Declaration
public static async Task<TResponse> PostAsync<TResponse>(this Uri uri, object content, CancellationToken cancellationToken = null)
    where TResponse : class
Parameters
Type Name Description
Uri uri

Uri to post to

System.Object content

Content to post

CancellationToken cancellationToken

CancellationToken

Returns
Type Description
Task<TResponse>

TResponse

Type Parameters
Name Description
TResponse

the generic type to return the result into, use HttpContent or HttpResponseMessage to get those unprocessed

| Improve this Doc View Source

PutAsync(Uri, Object, CancellationToken)

Method to Put content

Declaration
public static async Task PutAsync(this Uri uri, object content, CancellationToken cancellationToken = null)
Parameters
Type Name Description
Uri uri

Uri to put to

System.Object content

Content to put

CancellationToken cancellationToken

CancellationToken

Returns
Type Description
Task

task

| Improve this Doc View Source

PutAsync<TResponse>(Uri, Object, CancellationToken)

Method to Put content

Declaration
public static async Task<TResponse> PutAsync<TResponse>(this Uri uri, object content, CancellationToken cancellationToken = null)
    where TResponse : class
Parameters
Type Name Description
Uri uri

Uri to put to

System.Object content

Content to put

CancellationToken cancellationToken

CancellationToken

Returns
Type Description
Task<TResponse>

TResponse

Type Parameters
Name Description
TResponse

the generic type to return the result into, use HttpContent or HttpResponseMessage to get those unprocessed

  • Improve this Doc
  • View Source
In This Article
Back to top Copyright © Dapplo