Share via


IHttpClient.Post Method

.NET Framework 4

Makes an asynchronous http POST request to the specified url.

Namespace:  Microsoft.AspNet.SignalR.Client.Http
Assembly:  Microsoft.AspNet.SignalR.Client (in Microsoft.AspNet.SignalR.Client.dll)

Syntax

'Declaration
Function Post ( _
    url As String, _
    prepareRequest As Action(Of IRequest), _
    postData As IDictionary(Of String, String) _
) As Task(Of IResponse)
'Usage
Dim instance As IHttpClient 
Dim url As String 
Dim prepareRequest As Action(Of IRequest)
Dim postData As IDictionary(Of String, String)
Dim returnValue As Task(Of IResponse)

returnValue = instance.Post(url, prepareRequest, _
    postData)
Task<IResponse> Post(
    string url,
    Action<IRequest> prepareRequest,
    IDictionary<string, string> postData
)
Task<IResponse^>^ Post(
    String^ url, 
    Action<IRequest^>^ prepareRequest, 
    IDictionary<String^, String^>^ postData
)
abstract Post : 
        url:string * 
        prepareRequest:Action<IRequest> * 
        postData:IDictionary<string, string> -> Task<IResponse> 
function Post(
    url : String, 
    prepareRequest : Action<IRequest>, 
    postData : IDictionary<String, String>
) : Task<IResponse>

Parameters

  • prepareRequest
    Type: System.Action<IRequest>
    A callback that initializes the request with default values.

Return Value

Type: System.Threading.Tasks.Task<IResponse>
A Task<TResult>.

See Also

Reference

IHttpClient Interface

Microsoft.AspNet.SignalR.Client.Http Namespace