Note
Access to this page requires authorization. You can try signing in or .
Access to this page requires authorization. You can try .
HttpResponseData Class
Definition
- Namespace:
- Microsoft.Azure.Functions.Worker.Http
- Assembly:
- Microsoft.Azure.Functions.Worker.Core.dll
- Package:
- Microsoft.Azure.Functions.Worker.Core v1.11.0
- Source:
- HttpResponseData.cs
Important
Some information relates to prerelease product that may be substantially modified before itβs released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
A representation of the outgoing HTTP response.
public abstract class HttpResponseData
type HttpResponseData = class
Public MustInherit Class HttpResponseData
- Inheritance
-
HttpResponseData
Constructors
| Name | Description |
|---|---|
| HttpResponseData(FunctionContext) |
Initializes a new instance of the HttpResponseData class. |
Properties
| Name | Description |
|---|---|
| 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
| Name | Description |
|---|---|
| CreateResponse(HttpRequestData) |
Creates an HTTP response for the provided request. |
Extension 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 |
| 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 |
| 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 |
| 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 |
| 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 |
| 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 |
| 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 |
| 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 |
| 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
Azure SDK for .NET
Feedback
Was this page helpful?
