Hi all,
When issuing a platform.api.post
request from a V8 script service, it seems the options object is ignored. We've tested it in DF 2.2.0 and 2.2.1.
For example, the following code:
var options = {
headers: {
'X-MyHeader': 'Test'
}
};
platform.api.post("http://localhost:55555/posttest", JSON.stringify({a: 1}), options);
Sends the following request to localhost:
POST /posttest HTTP/1.1
Host: localhost:55555
Accept: */*
Content-Length: 7
Content-Type: application/x-www-form-urlencoded
{"a":1}
According to the V8 scripting documentation, the headers should be generated but I don't see them in the received request.
Any idea why the custom header option is ignored?
Thanks in advance.