HttpResponseMessageExtensionMethods.ToMessage(HttpResponseMessage) Method

Definition

Creates a Message instance from an HttpResponseMessage instance.

public static System.ServiceModel.Channels.Message ToMessage (this System.Net.Http.HttpResponseMessage httpResponseMessage);

Parameters

httpResponseMessage
HttpResponseMessage

The HttpResponseMessage from which to create the Message instance.

Returns

The new Message instance.

Remarks

The Message instance can be read, written and copied just as a traditional ByteStreamMessage instance. The Message instance can also "read" to retrieve the original HttpResponseMessage instance by calling the ToHttpResponseMessage extension method.

Applies to

Produs Versiuni
.NET Framework 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1