FacebookHelper.WriteAsync Method
Definition
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.
Writes an HTTP response payload.
public static System.Threading.Tasks.Task WriteAsync (Microsoft.AspNetCore.Http.HttpResponse response, System.Net.HttpStatusCode code, string text, System.Text.Encoding encoding, System.Threading.CancellationToken cancellationToken);
static member WriteAsync : Microsoft.AspNetCore.Http.HttpResponse * System.Net.HttpStatusCode * string * System.Text.Encoding * System.Threading.CancellationToken -> System.Threading.Tasks.Task
Public Shared Function WriteAsync (response As HttpResponse, code As HttpStatusCode, text As String, encoding As Encoding, cancellationToken As CancellationToken) As Task
Parameters
- response
- HttpResponse
The HTTP response to write to.
- code
- HttpStatusCode
The status code to apply.
- text
- String
The text to be written.
- encoding
- Encoding
The encoding for the text.
- cancellationToken
- CancellationToken
A cancellation token that can be used by other objects or threads to receive notice of cancellation.
Returns
A task that represents the work queued to execute.
Exceptions
response
, text
,
or encoding
is null.