Library for injecting in together with client code in Execution MS
NPM package here.
Client's code
const options = {
url: "https://en4tapktc2xtb.x.pipedream.net/test/vm",
method: "post",
headers: { "Content-Type": "application/json;charset=utf-8" },
data: {x: 123, y: "smth"}
};
const res1 = await sdk.axios(options);
const res2 = await sdk.axios(options);
const res3 = await sdk.axios(options);
output = [].push(res1.data, res2.data, res3.data);
ExecutionMS response
[
{
request_type: 'outgoing_http_request',
request_url: 'https://en4tapktc2xtb.x.pipedream.net/test/vm',
request_method: 'post',
request_headers: { 'Content-Type': 'application/json;charset=utf-8' },
request_data: {x: 123, y: "smth"},
response_status_code: 200,
response_status_text: 'OK',
response_headers: {
'access-control-allow-origin': '*',
'content-type': 'application/json; charset=utf-8',
date: 'Fri, 03 Jul 2020 16:37:20 GMT',
'x-pd-status': 'sent to primary',
'x-powered-by': 'Express',
'content-length': '16',
connection: 'Close'
},
response_body: { success: true }
},
{
request_type: 'outgoing_http_request',
request_url: 'https://en4tapktc2xtb.x.pipedream.net/test/vm',
request_method: 'post',
request_headers: { 'Content-Type': 'application/json;charset=utf-8' },
request_data: {x: 123, y: "smth"},
response_status_code: 200,
response_status_text: 'OK',
response_headers: {
'access-control-allow-origin': '*',
'content-type': 'application/json; charset=utf-8',
date: 'Fri, 03 Jul 2020 16:37:21 GMT',
'x-pd-status': 'sent to primary',
'x-powered-by': 'Express',
'content-length': '16',
connection: 'Close'
},
response_body: { success: true }
},
{
request_type: 'outgoing_http_request',
request_url: 'https://en4tapktc2xtb.x.pipedream.net/test/vm',
request_method: 'post',
request_headers: { 'Content-Type': 'application/json;charset=utf-8' },
request_data: {x: 123, y: "smth"},
response_status_code: 200,
response_status_text: 'OK',
response_headers: {
'access-control-allow-origin': '*',
'content-type': 'application/json; charset=utf-8',
date: 'Fri, 03 Jul 2020 16:37:21 GMT',
'x-pd-status': 'sent to primary',
'x-powered-by': 'Express',
'content-length': '16',
connection: 'Close'
},
response_body: { success: true }
}
]