HttpClient.Post(Text, HttpContent, var HttpResponseMessage) Method

Version: Available or changed with runtime version 1.0.

Sends a POST request to the specified URI as an asynchronous operation.

Syntax

[Ok := ]  HttpClient.Post(Path: Text, Content: HttpContent, var Response: HttpResponseMessage)

Parameters

HttpClient
 Type: HttpClient
An instance of the HttpClient data type.

Path
 Type: Text
The path the request is sent to.

Content
 Type: HttpContent
The HTTP request content sent to the server.

Response
 Type: HttpResponseMessage
The response received from the remote endpoint.

Return Value

[Optional] Ok
 Type: Boolean
Accessing the HttpContent property of HttpResponseMessage in a case when the request fails will result in an error. If you omit this optional return value and the operation does not execute successfully, a runtime error will occur.

See Also

HttpClient Data Type
Get Started with AL
Developing Extensions