Share via


IHttpClientExtensions.Post Method

.NET Framework 4

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

Syntax

'Declaration
<ExtensionAttribute> _
Public Shared Function Post ( _
    client As IHttpClient, _
    url As String, _
    prepareRequest As Action(Of IRequest) _
) As Task(Of IResponse)
'Usage
Dim client As IHttpClient 
Dim url As String 
Dim prepareRequest As Action(Of IRequest)
Dim returnValue As Task(Of IResponse)

returnValue = client.Post(url, prepareRequest)
public static Task<IResponse> Post(
    this IHttpClient client,
    string url,
    Action<IRequest> prepareRequest
)
[ExtensionAttribute]
public:
static Task<IResponse^>^ Post(
    IHttpClient^ client, 
    String^ url, 
    Action<IRequest^>^ prepareRequest
)
static member Post : 
        client:IHttpClient * 
        url:string * 
        prepareRequest:Action<IRequest> -> Task<IResponse> 
public static function Post(
    client : IHttpClient, 
    url : String, 
    prepareRequest : Action<IRequest>
) : Task<IResponse>

Parameters

Return Value

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

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type IHttpClient. When you use instance method syntax to call this method, omit the first parameter. For more information, see https://msdn.microsoft.com/en-us/library/bb384936(v=vs.100) or https://msdn.microsoft.com/en-us/library/bb383977(v=vs.100).

See Also

Reference

IHttpClientExtensions Class

Microsoft.AspNet.SignalR.Client.Http Namespace