HttpClientExtensions.PostAsXmlAsync Method
Namespace: System.Net.Http
Assembly: System.Net.Http.Formatting (in System.Net.Http.Formatting.dll)
Overload List
Name | Description | |
---|---|---|
PostAsXmlAsync<T>(HttpClient, String, T) | ||
PostAsXmlAsync<T>(HttpClient, String, T, CancellationToken) | ||
PostAsXmlAsync<T>(HttpClient, Uri, T) | Sends a POST request as an asynchronous operation to the specified Uri with the given value serialized as XML. |
|
PostAsXmlAsync<T>(HttpClient, Uri, T, CancellationToken) | Sends a POST request as an asynchronous operation to the specified Uri with the given value serialized as XML. |
See Also
HttpClientExtensions Class
System.Net.Http Namespace
Return to top
HttpClientExtensions.PostAsXmlAsync<T> Method (HttpClient, String, T)
Syntax
public static Task<HttpResponseMessage> PostAsXmlAsync<T>(
this HttpClient client,
string requestUri,
T value
)
public:
generic<typename T>
[ExtensionAttribute]
static Task<HttpResponseMessage^>^ PostAsXmlAsync(
HttpClient^ client,
String^ requestUri,
T value
)
static member PostAsXmlAsync<'T> :
client:HttpClient *
requestUri:string *
value:'T -> Task<HttpResponseMessage>
<ExtensionAttribute>
Public Shared Function PostAsXmlAsync(Of T) (
client As HttpClient,
requestUri As String,
value As T
) As Task(Of HttpResponseMessage)
Parameters
- client
Type: System.Net.Http.HttpClient
- requestUri
Type: System.String
- value
Type: T
Return Value
Type: System.Threading.Tasks.Task<HttpResponseMessage>
Type Parameters
- T
Return to top
HttpClientExtensions.PostAsXmlAsync<T> Method (HttpClient, String, T, CancellationToken)
Syntax
public static Task<HttpResponseMessage> PostAsXmlAsync<T>(
this HttpClient client,
string requestUri,
T value,
CancellationToken cancellationToken
)
public:
generic<typename T>
[ExtensionAttribute]
static Task<HttpResponseMessage^>^ PostAsXmlAsync(
HttpClient^ client,
String^ requestUri,
T value,
CancellationToken cancellationToken
)
static member PostAsXmlAsync<'T> :
client:HttpClient *
requestUri:string *
value:'T *
cancellationToken:CancellationToken -> Task<HttpResponseMessage>
<ExtensionAttribute>
Public Shared Function PostAsXmlAsync(Of T) (
client As HttpClient,
requestUri As String,
value As T,
cancellationToken As CancellationToken
) As Task(Of HttpResponseMessage)
Parameters
- client
Type: System.Net.Http.HttpClient
- requestUri
Type: System.String
- value
Type: T
- cancellationToken
Type: System.Threading.CancellationToken
Return Value
Type: System.Threading.Tasks.Task<HttpResponseMessage>
Type Parameters
- T
Return to top
HttpClientExtensions.PostAsXmlAsync<T> Method (HttpClient, Uri, T)
Sends a POST request as an asynchronous operation to the specified Uri with the given value serialized as XML.
Syntax
public static Task<HttpResponseMessage> PostAsXmlAsync<T>(
this HttpClient client,
Uri requestUri,
T value
)
public:
generic<typename T>
[ExtensionAttribute]
static Task<HttpResponseMessage^>^ PostAsXmlAsync(
HttpClient^ client,
Uri^ requestUri,
T value
)
static member PostAsXmlAsync<'T> :
client:HttpClient *
requestUri:Uri *
value:'T -> Task<HttpResponseMessage>
<ExtensionAttribute>
Public Shared Function PostAsXmlAsync(Of T) (
client As HttpClient,
requestUri As Uri,
value As T
) As Task(Of HttpResponseMessage)
Parameters
client
Type: System.Net.Http.HttpClientThe client used to make the request.
requestUri
Type: System.UriThe Uri the request is sent to.
value
Type: TThe value that will be placed in the request's entity body.
Return Value
Type: System.Threading.Tasks.Task<HttpResponseMessage>
A task object representing the asynchronous operation.
Type Parameters
- T
The type of value.
Return to top
HttpClientExtensions.PostAsXmlAsync<T> Method (HttpClient, Uri, T, CancellationToken)
Sends a POST request as an asynchronous operation to the specified Uri with the given value serialized as XML.
Syntax
public static Task<HttpResponseMessage> PostAsXmlAsync<T>(
this HttpClient client,
Uri requestUri,
T value,
CancellationToken cancellationToken
)
public:
generic<typename T>
[ExtensionAttribute]
static Task<HttpResponseMessage^>^ PostAsXmlAsync(
HttpClient^ client,
Uri^ requestUri,
T value,
CancellationToken cancellationToken
)
static member PostAsXmlAsync<'T> :
client:HttpClient *
requestUri:Uri *
value:'T *
cancellationToken:CancellationToken -> Task<HttpResponseMessage>
<ExtensionAttribute>
Public Shared Function PostAsXmlAsync(Of T) (
client As HttpClient,
requestUri As Uri,
value As T,
cancellationToken As CancellationToken
) As Task(Of HttpResponseMessage)
Parameters
client
Type: System.Net.Http.HttpClientThe client used to make the request.
requestUri
Type: System.UriThe Uri the request is sent to.
value
Type: TThe value that will be placed in the request's entity body.
cancellationToken
Type: System.Threading.CancellationTokenA cancellation token that can be used by other objects or threads to receive notice of cancellation.
Return Value
Type: System.Threading.Tasks.Task<HttpResponseMessage>
A task object representing the asynchronous operation.
Type Parameters
- T
The type of value.
Return to top