Skip to main content
Version: 5.7.0

GetResponseJson

{
"packetId": 1,
"messages": [
{
"service": "httpClient",
"operation": "GET_RESPONSE_JSON",
"data": {
"serviceCode": 1,
"path": "path/to/resource",
"query": {
"1": "Player Name",
"2": 2235
},
"headers": {
"1": "Player Name",
"2": 2235
}
}
}
]
}

This operation retrieves a JSON document from an external web site.

Results

NameDescription
responseJSON formatted response
ServiceOperation
httpClientGET_RESPONSE_JSON

Method Parameters

ParameterDescription
serviceCodeService code of the external service configured in the Cloud Code - Web Services section of the portal.
pathPath to append to the Base URL of the service.
queryOptional map of query values.
headersOptional map of extra headers.

Usage

http://localhost:3000
// S2S call: to view example, switch to the Cloud Code or Raw tab.
JSON Response
{
"packetId": 1,
"messageResponses": [
{
"status": 200,
"data": {
"response": {
"result": "Result content"
}
}
}
]
}