Appearance
Post Method
Definition
- Namespace:
JASE.Network - Assembly:
JASE.Network.dll
Overloads
Task<HttpTransaction> Post(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> Post(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 POST request to the specified URL.
Parameters
| Name | Description |
|---|---|
cancellationToken | CancellationToken |
contentType | The content type of the request body. |
cookies | Cookies to include in the request. |
credentials | Credentials to use for the request. |
encoding | The encoding to use for the request and response data. |
headers | Additional headers to include in the request. |
payload | The request body data. |
url | The URL to send the request to. |
userAgent | The user agent to include in the request. |
Returns
A HttpTransaction instance with the response data and metadata.
Task<HttpTransaction> Post(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> Post(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 an HTTP POST request to the specified URL and returns a HttpTransaction object representing the response.
Parameters
| Name | Description |
|---|---|
cancellationToken | CancellationToken |
contentType | The content type of the request. |
cookies | The cookies to include in the request. |
credentials | The credentials to use for the request. |
encoding | The encoding to use for the request and response. |
headers | A dictionary of headers to include in the request. |
payload | The payload to include in the request body. |
url | The URL to send the POST request to. |
userAgent | The user agent to include in the request headers. |
Returns
A Task1` that represents the asynchronous operation. The task result contains a HttpTransaction object representing the response.