HttpResponseData Class

Definition

A representation of the outgoing HTTP response.

public abstract class HttpResponseData
type HttpResponseData = class
Public MustInherit Class HttpResponseData
Inheritance
HttpResponseData

Constructors

HttpResponseData(FunctionContext)

Initializes a new instance of the HttpResponseData class.

Properties

Body

Gets or sets the response body stream.

Cookies

Gets an HttpCookies instance containing the request cookies.

FunctionContext

Gets the FunctionContext for this response.

Headers

Gets or sets a HttpHeadersCollection containing the response headers

StatusCode

Gets or sets the status code for the response.

Methods

CreateResponse(HttpRequestData)

Creates an HTTP response for the provided request.

Extension Methods

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

Write 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, HttpStatusCode, CancellationToken)

Write 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, ObjectSerializer, String, CancellationToken)

Write 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, CancellationToken)

Write 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, HttpStatusCode, CancellationToken)

Write 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, String, HttpStatusCode, CancellationToken)

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

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

Write 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, CancellationToken)

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

WriteBytes(HttpResponseData, Byte[])

Writes the provided bytes to the response body.

WriteBytesAsync(HttpResponseData, Byte[])

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, Encoding)

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

Applies to