How to change http header on server side platform.api.get method

I figured out. You need to use the full URL like platform.api.post(
http://URL/api/v2/db/example_table”,

Also you need to set the headers (session and app key) again as it is a new api call.

var options = {
“CURLOPT_HTTPHEADER”: [“Content-type: application/json”, “X-HTTP-Method: GET”,"X-Dreamfactory-Api-Key:event.request.headers[“x-dreamfactory-api-key”],“X-DreamFactory-Session-Token:”+event.request.headers[“x-dreamfactory-session-token”]]
};

1 Like