Appearance
Put Method
Definition
- Namespace:
JASE.Network - Assembly:
JASE.Network.dll
Overloads
| Name | Description |
|---|---|
Task<HttpTransaction> Put(string url, FormContentType contentType = null, string userAgent = null, IReadOnlyDictionary<string, string> headers = null, FormDataCollection payload = null, ClientCredential credentials = null, CookieCollection cookies = null, Encoding encoding = null, CancellationToken cancellationToken = null) | Sends an HTTP PUT request to the specified URL. |
Task<HttpTransaction> Put(string url, string contentType = null, string userAgent = null, IReadOnlyDictionary<string, string> headers = null, string payload = null, ClientCredential credentials = null, CookieCollection cookies = null, Encoding encoding = null, CancellationToken cancellationToken = null) | Sends a PUT request to the specified URL with the given payload and headers using the specified content type. |
Task<HttpTransaction> Put(string url, FormContentType contentType = null, string userAgent = null, IReadOnlyDictionary<string, string> headers = null, FormDataCollection payload = null, ClientCredential credentials = null, CookieCollection cookies = null, Encoding encoding = null, CancellationToken cancellationToken = null)
csharp
Task<HttpTransaction> Put(string url, FormContentType contentType = null, string userAgent = null, IReadOnlyDictionary<string, string> headers = null, FormDataCollection payload = null, ClientCredential credentials = null, CookieCollection cookies = null, Encoding encoding = null, CancellationToken cancellationToken = null)Sends an HTTP PUT request to the specified URL.
Parameters
| Name | Description |
|---|---|
cancellationToken | CancellationToken |
contentType | The content type of the payload. Defaults to UrlEncoded. |
cookies | The cookies to include in the request. |
credentials | The authentication credentials to use for the request. |
encoding | The character encoding to use for the request. Defaults to UTF-8. |
headers | Additional headers to include in the request. |
payload | The data to include in the request body. |
url | The URL to send the request to. |
userAgent | The user agent to include in the request header. Defaults to "JASE.Core.Web". |
Returns
A WebClient object representing the HTTP response.
Task<HttpTransaction> Put(string url, string contentType = null, string userAgent = null, IReadOnlyDictionary<string, string> headers = null, string payload = null, ClientCredential credentials = null, CookieCollection cookies = null, Encoding encoding = null, CancellationToken cancellationToken = null)
csharp
Task<HttpTransaction> Put(string url, string contentType = null, string userAgent = null, IReadOnlyDictionary<string, string> headers = null, string payload = null, ClientCredential credentials = null, CookieCollection cookies = null, Encoding encoding = null, CancellationToken cancellationToken = null)Sends a PUT request to the specified URL with the given payload and headers using the specified content type.
Parameters
| Name | Description |
|---|---|
cancellationToken | CancellationToken |
contentType | The content type of the payload. Default is "application/x-www-form-urlencoded". |
cookies | The cookies to include in the request. |
credentials | The authentication credentials to use for the request. |
encoding | The encoding to use for the payload. Default is UTF-8. |
headers | The additional headers to include in the request. |
payload | The payload to include in the request. |
url | The URL to which the PUT request is sent. |
userAgent | The user agent string to use in the request header. Default is "JASE.Core.Web". |
Returns
A WebClient object representing the response to the PUT request.