次の方法で共有


HttpContentMessageExtensions.ReadAsHttpResponseMessageAsync Method

 

Namespace:   System.Net.Http
Assembly:  System.Net.Http.Formatting (in System.Net.Http.Formatting.dll)

Overload List

Name Description
System_CAPS_pubmethodSystem_CAPS_static ReadAsHttpResponseMessageAsync(HttpContent)

Reads the HttpContent as an HttpResponseMessage.

System_CAPS_pubmethodSystem_CAPS_static ReadAsHttpResponseMessageAsync(HttpContent, CancellationToken)

System_CAPS_pubmethodSystem_CAPS_static ReadAsHttpResponseMessageAsync(HttpContent, Int32)

Reads the HttpContent as an HttpResponseMessage.

System_CAPS_pubmethodSystem_CAPS_static ReadAsHttpResponseMessageAsync(HttpContent, Int32, CancellationToken)

System_CAPS_pubmethodSystem_CAPS_static ReadAsHttpResponseMessageAsync(HttpContent, Int32, Int32)

Reads the HttpContent as an HttpResponseMessage.

System_CAPS_pubmethodSystem_CAPS_static 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

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

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

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

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

  • maxHeaderSize
    Type: System.Int32

    The 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

Return Value

Type: System.Threading.Tasks.Task<HttpResponseMessage>

Return to top