HttpContentMessageExtensions.ReadAsHttpResponseMessageAsync Method
Namespace: System.Net.Http
Assembly: System.Net.Http.Formatting (in System.Net.Http.Formatting.dll)
Overload List
Name | Description | |
---|---|---|
ReadAsHttpResponseMessageAsync(HttpContent) | Reads the HttpContent as an HttpResponseMessage. |
|
ReadAsHttpResponseMessageAsync(HttpContent, CancellationToken) | ||
ReadAsHttpResponseMessageAsync(HttpContent, Int32) | Reads the HttpContent as an HttpResponseMessage. |
|
ReadAsHttpResponseMessageAsync(HttpContent, Int32, CancellationToken) | ||
ReadAsHttpResponseMessageAsync(HttpContent, Int32, Int32) | Reads the HttpContent as an HttpResponseMessage. |
|
ReadAsHttpResponseMessageAsync(HttpContent, Int32, Int32, CancellationToken) |
See Also
HttpContentMessageExtensions Class
System.Net.Http Namespace
Return to top
HttpContentMessageExtensions.ReadAsHttpResponseMessageAsync Method (HttpContent)
Reads the HttpContent as an HttpResponseMessage.
Syntax
public static Task<HttpResponseMessage> ReadAsHttpResponseMessageAsync(
this HttpContent content
)
public:
[ExtensionAttribute]
static Task<HttpResponseMessage^>^ ReadAsHttpResponseMessageAsync(
HttpContent^ content
)
static member ReadAsHttpResponseMessageAsync :
content:HttpContent -> Task<HttpResponseMessage>
<ExtensionAttribute>
Public Shared Function ReadAsHttpResponseMessageAsync (
content As HttpContent
) As Task(Of HttpResponseMessage)
Parameters
content
Type: System.Net.Http.HttpContentThe content to read.
Return Value
Type: System.Threading.Tasks.Task<HttpResponseMessage>
The parsed HttpResponseMessage instance.
Return to top
HttpContentMessageExtensions.ReadAsHttpResponseMessageAsync Method (HttpContent, CancellationToken)
Syntax
public static Task<HttpResponseMessage> ReadAsHttpResponseMessageAsync(
this HttpContent content,
CancellationToken cancellationToken
)
public:
[ExtensionAttribute]
static Task<HttpResponseMessage^>^ ReadAsHttpResponseMessageAsync(
HttpContent^ content,
CancellationToken cancellationToken
)
static member ReadAsHttpResponseMessageAsync :
content:HttpContent *
cancellationToken:CancellationToken -> Task<HttpResponseMessage>
<ExtensionAttribute>
Public Shared Function ReadAsHttpResponseMessageAsync (
content As HttpContent,
cancellationToken As CancellationToken
) As Task(Of HttpResponseMessage)
Parameters
- content
Type: System.Net.Http.HttpContent
- cancellationToken
Type: System.Threading.CancellationToken
Return Value
Type: System.Threading.Tasks.Task<HttpResponseMessage>
Return to top
HttpContentMessageExtensions.ReadAsHttpResponseMessageAsync Method (HttpContent, Int32)
Reads the HttpContent as an HttpResponseMessage.
Syntax
public static Task<HttpResponseMessage> ReadAsHttpResponseMessageAsync(
this HttpContent content,
int bufferSize
)
public:
[ExtensionAttribute]
static Task<HttpResponseMessage^>^ ReadAsHttpResponseMessageAsync(
HttpContent^ content,
int bufferSize
)
static member ReadAsHttpResponseMessageAsync :
content:HttpContent *
bufferSize:int -> Task<HttpResponseMessage>
<ExtensionAttribute>
Public Shared Function ReadAsHttpResponseMessageAsync (
content As HttpContent,
bufferSize As Integer
) As Task(Of HttpResponseMessage)
Parameters
content
Type: System.Net.Http.HttpContentThe content to read.
bufferSize
Type: System.Int32The size of the buffer.
Return Value
Type: System.Threading.Tasks.Task<HttpResponseMessage>
The parsed HttpResponseMessage instance.
Return to top
HttpContentMessageExtensions.ReadAsHttpResponseMessageAsync Method (HttpContent, Int32, CancellationToken)
Syntax
public static Task<HttpResponseMessage> ReadAsHttpResponseMessageAsync(
this HttpContent content,
int bufferSize,
CancellationToken cancellationToken
)
public:
[ExtensionAttribute]
static Task<HttpResponseMessage^>^ ReadAsHttpResponseMessageAsync(
HttpContent^ content,
int bufferSize,
CancellationToken cancellationToken
)
static member ReadAsHttpResponseMessageAsync :
content:HttpContent *
bufferSize:int *
cancellationToken:CancellationToken -> Task<HttpResponseMessage>
<ExtensionAttribute>
Public Shared Function ReadAsHttpResponseMessageAsync (
content As HttpContent,
bufferSize As Integer,
cancellationToken As CancellationToken
) As Task(Of HttpResponseMessage)
Parameters
- content
Type: System.Net.Http.HttpContent
- bufferSize
Type: System.Int32
- cancellationToken
Type: System.Threading.CancellationToken
Return Value
Type: System.Threading.Tasks.Task<HttpResponseMessage>
Return to top
HttpContentMessageExtensions.ReadAsHttpResponseMessageAsync Method (HttpContent, Int32, Int32)
Reads the HttpContent as an HttpResponseMessage.
Syntax
public static Task<HttpResponseMessage> ReadAsHttpResponseMessageAsync(
this HttpContent content,
int bufferSize,
int maxHeaderSize
)
public:
[ExtensionAttribute]
static Task<HttpResponseMessage^>^ ReadAsHttpResponseMessageAsync(
HttpContent^ content,
int bufferSize,
int maxHeaderSize
)
static member ReadAsHttpResponseMessageAsync :
content:HttpContent *
bufferSize:int *
maxHeaderSize:int -> Task<HttpResponseMessage>
<ExtensionAttribute>
Public Shared Function ReadAsHttpResponseMessageAsync (
content As HttpContent,
bufferSize As Integer,
maxHeaderSize As Integer
) As Task(Of HttpResponseMessage)
Parameters
content
Type: System.Net.Http.HttpContentThe content to read.
bufferSize
Type: System.Int32The size of the buffer.
maxHeaderSize
Type: System.Int32The maximum length of the HTTP header.
Return Value
Type: System.Threading.Tasks.Task<HttpResponseMessage>
The parsed HttpResponseMessage instance.
Return to top
HttpContentMessageExtensions.ReadAsHttpResponseMessageAsync Method (HttpContent, Int32, Int32, CancellationToken)
Syntax
public static Task<HttpResponseMessage> ReadAsHttpResponseMessageAsync(
this HttpContent content,
int bufferSize,
int maxHeaderSize,
CancellationToken cancellationToken
)
public:
[ExtensionAttribute]
static Task<HttpResponseMessage^>^ ReadAsHttpResponseMessageAsync(
HttpContent^ content,
int bufferSize,
int maxHeaderSize,
CancellationToken cancellationToken
)
static member ReadAsHttpResponseMessageAsync :
content:HttpContent *
bufferSize:int *
maxHeaderSize:int *
cancellationToken:CancellationToken -> Task<HttpResponseMessage>
<ExtensionAttribute>
Public Shared Function ReadAsHttpResponseMessageAsync (
content As HttpContent,
bufferSize As Integer,
maxHeaderSize As Integer,
cancellationToken As CancellationToken
) As Task(Of HttpResponseMessage)
Parameters
- content
Type: System.Net.Http.HttpContent
- bufferSize
Type: System.Int32
- maxHeaderSize
Type: System.Int32
- cancellationToken
Type: System.Threading.CancellationToken
Return Value
Type: System.Threading.Tasks.Task<HttpResponseMessage>
Return to top