HttpResponseDataExtensions Class

Definition

Provides extension methods to work with an HttpResponseData instance.

public static class HttpResponseDataExtensions
type HttpResponseDataExtensions = class
Public Module HttpResponseDataExtensions
Inheritance
HttpResponseDataExtensions

Methods

WriteAsJsonAsync<T>(HttpResponseData, T, CancellationToken)

Asynchronously writes the specified value as JSON to the response body using the default ObjectSerializer configured for this worker. The response content-type will be set to application/json; charset=utf-8 and the status code set to 200.

WriteAsJsonAsync<T>(HttpResponseData, T, HttpStatusCode, CancellationToken)

Asynchronously writes the specified value as JSON to the response body using the default ObjectSerializer configured for this worker. The response content-type will be set to application/json; charset=utf-8 and the status code set to the provided statusCode.

WriteAsJsonAsync<T>(HttpResponseData, T, ObjectSerializer, CancellationToken)

Asynchronously writes the specified value as JSON to the response body using the provided ObjectSerializer. The response content-type will be set to application/json; charset=utf-8 and the status code set to 200.

WriteAsJsonAsync<T>(HttpResponseData, T, ObjectSerializer, HttpStatusCode, CancellationToken)

Asynchronously writes the specified value as JSON to the response body using the provided ObjectSerializer. The response content-type will be set to application/json; charset=utf-8 and the status code set to the provided statusCode.

WriteAsJsonAsync<T>(HttpResponseData, T, ObjectSerializer, String, CancellationToken)

Asynchronously writes the specified value as JSON to the response body using the provided ObjectSerializer. The response content-type will be set to the provided contentType and the status code set to 200.

WriteAsJsonAsync<T>(HttpResponseData, T, ObjectSerializer, String, HttpStatusCode, CancellationToken)

Asynchronously writes the specified value as JSON to the response body using the provided ObjectSerializer. The response content-type will be set to the provided contentType and the status code set to the provided statusCode.

WriteAsJsonAsync<T>(HttpResponseData, T, String, CancellationToken)

Asynchronously writes the specified value as JSON to the response body using the default ObjectSerializer configured for this worker. The response content-type will be set to the provided contentType and the status code set to 200.

WriteAsJsonAsync<T>(HttpResponseData, T, String, HttpStatusCode, CancellationToken)

Asynchronously writes the specified value as JSON to the response body using the default ObjectSerializer configured for this worker. The response content-type will be set to the provided contentType and the status code set to the provided statusCode.

WriteBytes(HttpResponseData, Byte[])

Writes the provided bytes to the response body.

WriteBytesAsync(HttpResponseData, Byte[])

Asynchronously writes the provided bytes to the response body.

WriteBytesAsync(HttpResponseData, Byte[], CancellationToken)

Asynchronously writes the provided bytes to the response body, and monitors cancellation requests.

WriteString(HttpResponseData, String, Encoding)

Writes the provided string to the response body using the specified encoding.

WriteStringAsync(HttpResponseData, String, CancellationToken, Encoding)

Asynchronously writes the provided string to the response body using the specified encoding, and monitors cancellation requests.

WriteStringAsync(HttpResponseData, String, Encoding)

Asynchronously writes the provided string to the response body using the specified encoding.

Applies to