ping@1.0.0
This adaptor exports the following namespaced functions:
This adaptor exports the following from common:
- as()
- combine()
- cursor()
- dataPath()
- dataValue()
- dateFns
- each()
- field()
- fields()
- fn()
- fnIf()
- group()
- lastReferenceValue()
- map()
- merge()
- scrubEmojis()
- sourceValue()
- util
http
These functions belong to the http namespace.
http.post
post(path, body, options) ⇒ Operation
Make a POST request
| Param | Type | Description |
|---|---|---|
| path | string | Path to resource |
| body | object | Object which will be attached to the POST body |
| options | RequestOptions | Optional request options |
This operation writes the following keys to state:
| State Key | Description |
|---|---|
| data | the parsed response body |
| response | the response from the HTTP server, including headers, statusCode, body, etc |
| references | an array of all previous data objects used in the Job |
Example: Update intervention records in PING
post('/api/ingestion/v2/PNR-1363/data', {
"ShippingProcessId": "SHP-2345",
"InteropId": "INT-1234",
"Data": [{
"ExternalId": "id55",
"Fields": [{
"Name": "progres_lpinterventionid",
"Value": "12345-5u3i43f3-3r3f34f-34f34f"
}]
}]
});
Interfaces
HttpState
State object
Properties
| Name | Description |
|---|---|
| data | the parsed response body |
| response | the response from the HTTP server, including headers, statusCode, body, etc |
| references | an array of all previous data objects used in the Job |
RequestOptions
Options provided to the HTTP request
Properties
| Name | Type | Description |
|---|---|---|
| body | object | string | body data to append to the request. JSON will be converted to a string. |
| query | object | An object of query parameters to be encoded into the URL. |
| headers | object | An object of headers to append to the request. |