PostJsonOffboard
Posts a JSON document to an offboard service. Send and forget.
Error reason codes
Parameter | Description |
---|---|
40443 | Processing exception (message): Invalid service code. Ensure the Web Service has been configured |
Service | Operation |
---|---|
httpClient | POST_JSON_OFFBOARD |
Method Parameters
Parameter | Description |
---|---|
serviceCode | Service code of the external service configured in the Cloud Code - Web Services section of the portal. |
path | Path to append to the Base URL of the service. |
headers | A map of extra headers. |
json | JSON formatted data to post. |
Usage
http://localhost:3000
- C#
- C++
- Objective-C
- Java
- JavaScript
- Dart
- Cloud Code
- Raw
// S2S call: to view example, switch to the Cloud Code or Raw tab.
// S2S call: to view example, switch to the Cloud Code or Raw tab.
// S2S call: to view example, switch to the Cloud Code or Raw tab.
// S2S call: to view example, switch to the Cloud Code or Raw tab.
// S2S call: to view example, switch to the Cloud Code or Raw tab.
// S2S call: to view example, switch to the Cloud Code or Raw tab.
var serviceCode = "webService";
var path = "resource/dir";
var headers = {
"headerName": "value"
};
var json = {
"key": "value"
};
var httpClientProxy = bridge.getHttpClientServiceProxy();
var postResult = httpClientProxy.postJsonOffboard(serviceCode, path, headers, json);
if (postResult.status == 200) {
// Success!
}
{
"service": "httpClient",
"operation": "POST_JSON_OFFBOARD",
"data": {
"serviceCode": "webService",
"path": "resource/dir",
"headers": {
"headerName": "value"
},
"json": {
"key": "value"
}
}
}