Language

IHttpMessageWriterExtensions.WriteAsync Method

Definition

Runs the blocking HTTP message writer on a thread-pool thread.

public static System.Threading.Tasks.Task WriteAsync(this Org.Apache.Http.IO.IHttpMessageWriter self, Org.Apache.Http.IHttpMessage? message);
static member WriteAsync : Org.Apache.Http.IO.IHttpMessageWriter * Org.Apache.Http.IHttpMessage -> System.Threading.Tasks.Task

Parameters

self
IHttpMessageWriter

The message writer on which to call Write(IHttpMessage).

message
IHttpMessage

The HTTP message whose start line and headers are to be written.

Returns

A task that completes when the blocking write operation completes.

Remarks

The operation calls Write(IHttpMessage). It does not write the message body or call Flush(). Writes can cause buffered data to be sent to the underlying stream when the buffer fills. Await the task to observe completion or an exception from the blocking method.

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to