Developer Function: Server Script: httpClient.Get
Overview¶
Used when issuing a GET method using "httpClient" in "Server Script".
Syntax¶
Parameters¶
There are no parameters.
Return Value¶
String-type return value
Usage Example¶
The following example issues a GET method to an external API server and outputs the result to the log.
JavaScript¶
httpClient.RequestUri = 'https://servername/api/.....';
let response = httpClient.Get();
if(httpClient.IsSuccess) {
context.Log('Success: ' + response);
}else{
context.Log('Error: (' + httpClient.StatusCode + ')' + response);
}