Share via


HttpResponseDataExtensions.WriteStringAsync Method

Definition

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)

Source:
HttpResponseDataExtensions.cs

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)

Source:
HttpResponseDataExtensions.cs

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