I’m trying to communicate with this webservice using javascript how do I set the last requestheader using javascript?
curl -X POST \
-H "X-Parse-Application-Id: 57865" \
-H "X-Parse-REST-API-Key: 87468977" \
-H "Content-Type: application/json" \
-d '{}' \
http://api.thisisatest.com/1/test
so far i have this below, but the “d” is incorrect and I’m not sure what that should be any help is appreciated.
xhr.setRequestHeader("X-Parse-Application-Id", "57865");
xhr.setRequestHeader("X-Parse-REST-API-Key", "87468977");
xhr.setRequestHeader("Content-Type", "application/json");
//xhr.setRequestHeader("d", "{}");
-drepresent the actual request body. Try this: