V8JS: How to get response headers from platform.api.post call?


I have a line like this in a server side V8js post process script:

var result = platform.api.post("http://example.com/my_api", JSON.stringify({"name":"test"}), options);

How can I get the response headers? Trying to do var_dump(result) does not give the response headers.

If you’re looking for just the response that comes from that post, then you can use:

event.response.content = {"result": result};

Hi Joshua

I am actually looking for the response headers. Those do not seem to show up. Any thoughts?