Skip to content

Post Method ​

Definition ​

  • Namespace: JASE.Network
  • Assembly: JASE.Network.dll

Overloads ​

NameDescription
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.
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.

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 ​

NameDescription
cancellationTokenCancellationToken
contentTypeThe content type of the request body.
cookiesCookies to include in the request.
credentialsCredentials to use for the request.
encodingThe encoding to use for the request and response data.
headersAdditional headers to include in the request.
payloadThe request body data.
urlThe URL to send the request to.
userAgentThe 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 ​

NameDescription
cancellationTokenCancellationToken
contentTypeThe content type of the request.
cookiesThe cookies to include in the request.
credentialsThe credentials to use for the request.
encodingThe encoding to use for the request and response.
headersA dictionary of headers to include in the request.
payloadThe payload to include in the request body.
urlThe URL to send the POST request to.
userAgentThe 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.