HttpResponseDataExtensions.WriteStringAsync 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.
Overloads
WriteStringAsync(HttpResponseData, String, Encoding) |
Asynchronously 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.
public static System.Threading.Tasks.Task WriteStringAsync (this Microsoft.Azure.Functions.Worker.Http.HttpResponseData response, string value, System.Text.Encoding? encoding = default);
static member WriteStringAsync : Microsoft.Azure.Functions.Worker.Http.HttpResponseData * string * System.Text.Encoding -> System.Threading.Tasks.Task
<Extension()>
Public Function WriteStringAsync (response As HttpResponseData, value As String, Optional encoding As Encoding = Nothing) As Task
Parameters
- response
- HttpResponseData
The response to write the string to.
- value
- String
The string content to write to the request body.
- encoding
- Encoding
The encoding to use when writing the string. Defaults to UTF-8
Returns
A Task representing the asynchronous operation.
Applies to
WriteStringAsync(HttpResponseData, String, CancellationToken, Encoding)
Asynchronously writes the provided string to the response body using the specified encoding, and monitors cancellation requests.
public static System.Threading.Tasks.Task WriteStringAsync (this Microsoft.Azure.Functions.Worker.Http.HttpResponseData response, string value, System.Threading.CancellationToken cancellationToken, System.Text.Encoding? encoding = default);
static member WriteStringAsync : Microsoft.Azure.Functions.Worker.Http.HttpResponseData * string * System.Threading.CancellationToken * System.Text.Encoding -> System.Threading.Tasks.Task
<Extension()>
Public Function WriteStringAsync (response As HttpResponseData, value As String, cancellationToken As CancellationToken, Optional encoding As Encoding = Nothing) As Task
Parameters
- response
- HttpResponseData
The response to write the string to.
- value
- String
The string content to write to the request body.
- cancellationToken
- CancellationToken
The token to monitor for cancellation requests.
- encoding
- Encoding
The encoding to use when writing the string. Defaults to UTF-8
Returns
A Task representing the asynchronous operation.
Applies to
Azure SDK for .NET