HttpClient.Get(Text, var HttpResponseMessage) Method

Version: Available or changed with runtime version 1.0.

Sends a GET request to get the resource identified by the request URL.

Syntax

[Ok := ]  HttpClient.Get(Path: Text, var Response: HttpResponseMessage)

Parameters

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

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

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