hi,
When making API calls from scripts, is it a good practice to set headers explicitly? If yes then what headers are most appropriate and needed for making calls to DF API? Like for the example below, what headers are necessary?
var options = {
"CURLOPT_HTTPHEADER": ["Content-type: application/json", "Some-Other-Header: blah"]
};
result = platform.api.post("http://example.com/my_api", {"name":"test"}, options);
And a small doubt, when I print the result of an API call I see the following text
{"status_code":200,"content":{"resource":[{"_id":"56fe51047d57d001183c987a"}]},"content_type":null,"format":201}
Why is the content_type set to null?
Cheers,
M.M