logo
logo

Interface IRawClient

Contains functionality to do custom HTTP requests, while still being authenticated and impersonated (if impersonating). Custom HTTP clients or delegating handlers are still used. Events are still fired.

Namespace: Stylelabs.M.Sdk.WebClient.Contracts
Assembly: Stylelabs.M.Sdk.WebClient.dll
Syntax
public interface IRawClient

Methods

DeleteAsync(String, IDictionary<String, String>)

Sends a DELETE request.

Declaration
Task<HttpResponseMessage> DeleteAsync(string uri, IDictionary<string, string> headers = null)
Parameters
Type Name Description
System.String uri

Request URL.

IDictionary<System.String, System.String> headers

Headers to include.

Returns
Type Description
Task<HttpResponseMessage>

HTTP response.

DeleteAsync(Uri, IDictionary<String, String>)

Sends a DELETE request.

Declaration
Task<HttpResponseMessage> DeleteAsync(Uri uri, IDictionary<string, string> headers = null)
Parameters
Type Name Description
Uri uri

Request URL.

IDictionary<System.String, System.String> headers

Headers to include.

Returns
Type Description
Task<HttpResponseMessage>

HTTP response.

GetAsync(String, IDictionary<String, String>)

Sends a GET request.

Declaration
Task<HttpResponseMessage> GetAsync(string uri, IDictionary<string, string> headers = null)
Parameters
Type Name Description
System.String uri

Request URL.

IDictionary<System.String, System.String> headers

Headers to include.

Returns
Type Description
Task<HttpResponseMessage>

HTTP response.

GetAsync(Uri, IDictionary<String, String>)

Sends a GET request.

Declaration
Task<HttpResponseMessage> GetAsync(Uri uri, IDictionary<string, string> headers = null)
Parameters
Type Name Description
Uri uri

Request URL.

IDictionary<System.String, System.String> headers

Headers to include.

Returns
Type Description
Task<HttpResponseMessage>

HTTP response.

PostAsync(String, HttpContent, IDictionary<String, String>)

Sends a POST request.

Declaration
Task<HttpResponseMessage> PostAsync(string uri, HttpContent content = null, IDictionary<string, string> headers = null)
Parameters
Type Name Description
System.String uri

Request URL.

HttpContent content

The HTTP content to send.

IDictionary<System.String, System.String> headers

Headers to include.

Returns
Type Description
Task<HttpResponseMessage>

HTTP response.

PostAsync(Uri, HttpContent, IDictionary<String, String>)

Sends a POST request.

Declaration
Task<HttpResponseMessage> PostAsync(Uri uri, HttpContent content = null, IDictionary<string, string> headers = null)
Parameters
Type Name Description
Uri uri

Request URL.

HttpContent content

The HTTP content to send.

IDictionary<System.String, System.String> headers

Headers to include.

Returns
Type Description
Task<HttpResponseMessage>

HTTP response.

PutAsync(String, HttpContent, IDictionary<String, String>)

Sends a PUT request.

Declaration
Task<HttpResponseMessage> PutAsync(string uri, HttpContent content = null, IDictionary<string, string> headers = null)
Parameters
Type Name Description
System.String uri

Request URL.

HttpContent content

The HTTP content to send.

IDictionary<System.String, System.String> headers

Headers to include.

Returns
Type Description
Task<HttpResponseMessage>

HTTP response.

PutAsync(Uri, HttpContent, IDictionary<String, String>)

Sends a PUT request.

Declaration
Task<HttpResponseMessage> PutAsync(Uri uri, HttpContent content = null, IDictionary<string, string> headers = null)
Parameters
Type Name Description
Uri uri

Request URL.

HttpContent content

The HTTP content to send.

IDictionary<System.String, System.String> headers

Headers to include.

Returns
Type Description
Task<HttpResponseMessage>

HTTP response.

SendAsync(Func<HttpRequestMessage>)

Does a HTTP request by using a message factory so that the request can be retried.

Declaration
Task<HttpResponseMessage> SendAsync(Func<HttpRequestMessage> messageFactory)
Parameters
Type Name Description
Func<HttpRequestMessage> messageFactory

Message factory.

Returns
Type Description
Task<HttpResponseMessage>

HTTP response.

Can we improve this article ? Provide feedback