HttpClientExtensions Class
Extension methods that aid in making formatted requests using HttpClient.
Inheritance Hierarchy
System.Object
System.Net.Http.HttpClientExtensions
Namespace: System.Net.Http
Assembly: System.Net.Http.Formatting (in System.Net.Http.Formatting.dll)
Syntax
'Declaration
<ExtensionAttribute> _
Public NotInheritable Class HttpClientExtensions
'Usage
public static class HttpClientExtensions
[ExtensionAttribute]
public ref class HttpClientExtensions abstract sealed
[<AbstractClassAttribute>]
[<SealedAttribute>]
type HttpClientExtensions = class end
public final class HttpClientExtensions
Methods
Name | Description | |
---|---|---|
PostAsJsonAsync<T>(HttpClient, String, T) | Sends a POST request as an asynchronous operation, with a specified value serialized as JSON. | |
PostAsJsonAsync<T>(HttpClient, String, T, CancellationToken) | Sends a POST request as an asynchronous operation, with a specified value serialized as JSON. Includes a cancellation token to cancel the request. | |
PostAsXmlAsync<T>(HttpClient, String, T) | Sends a POST request as an asynchronous operation, with a specified value serialized as XML. | |
PostAsXmlAsync<T>(HttpClient, String, T, CancellationToken) | Sends a POST request as an asynchronous operation, with a specified value serialized as XML. Includes a cancellation token to cancel the request. | |
PostAsync<T>(HttpClient, String, T, MediaTypeFormatter) | Sends a POST request as an asynchronous operation, with a specified value serialized using the given formatter. | |
PostAsync<T>(HttpClient, String, T, MediaTypeFormatter, String) | Sends a POST request as an asynchronous operation, with a specified value serialized using the given formatter and media type string. | |
PostAsync<T>(HttpClient, String, T, MediaTypeFormatter, CancellationToken) | Sends a POST request as an asynchronous operation, with a specified value serialized using the given formatter. Includes a cancellation token to cancel the request. | |
PostAsync<T>(HttpClient, String, T, MediaTypeFormatter, MediaTypeHeaderValue, CancellationToken) | Sends a POST request as an asynchronous operation, with a specified value serialized using the given formatter and media type. | |
PostAsync<T>(HttpClient, String, T, MediaTypeFormatter, String, CancellationToken) | Sends a POST request as an asynchronous operation, with a specified value serialized using the given formatter and media type string. Includes a cancellation token to cancel the request. | |
PutAsJsonAsync<T>(HttpClient, String, T) | Sends a PUT request as an asynchronous operation, with a specified value serialized as JSON. | |
PutAsJsonAsync<T>(HttpClient, String, T, CancellationToken) | Sends a PUT request as an asynchronous operation, with a specified value serialized as JSON. Includes a cancellation token to cancel the request. | |
PutAsXmlAsync<T>(HttpClient, String, T) | Sends a PUT request as an asynchronous operation, with a specified value serialized as XML. | |
PutAsXmlAsync<T>(HttpClient, String, T, CancellationToken) | Sends a PUT request as an asynchronous operation, with a specified value serialized as XML. Includes a cancellation token to cancel the request. | |
PutAsync<T>(HttpClient, String, T, MediaTypeFormatter) | Sends a PUT request as an asynchronous operation, with a specified value serialized using the given formatter. | |
PutAsync<T>(HttpClient, String, T, MediaTypeFormatter, String) | Sends a PUT request as an asynchronous operation, with a specified value serialized using the given formatter and media type string. | |
PutAsync<T>(HttpClient, String, T, MediaTypeFormatter, CancellationToken) | Sends a PUT request as an asynchronous operation, with a specified value serialized using the given formatter and medai type string. Includes a cancellation token to cancel the request. | |
PutAsync<T>(HttpClient, String, T, MediaTypeFormatter, MediaTypeHeaderValue, CancellationToken) | Sends a PUT request as an asynchronous operation, with a specified value serialized using the given formatter and media type. Includes a cancellation token to cancel the request. | |
PutAsync<T>(HttpClient, String, T, MediaTypeFormatter, String, CancellationToken) | Sends a PUT request as an asynchronous operation, with a specified value serialized using the given formatter and media type string. Includes a cancellation token to cancel the request. |
Top
Thread Safety
Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.