通过


你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn

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

Name Description
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[], CancellationToken)

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

WriteBytesAsync(HttpResponseData, Byte[])

Asynchronously writes the provided bytes to the response body.

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