How to modify Content-Type from init() function?
HI.
I'm trying to modify the content-type of the login Request from the init() function in my script. The server I'm trying to connect need this. I have to set it to "application/x-www-form-urlencoded"
Is it possible to do? What method / function should I use?
Thanks for your time!! ;)
LA
Thu, 02/12/2015 - 05:46
Permalink
Just in case you still need
Just in case you still need an answer -
var aHeaders = {"some-header": "some-value", "content-type": "application/x-www-form-urlencoded"};
this.getHtml("http://example.com", aPostData, aHeaders, "post");
But I think "post" and "application/x-www-form-urlencoded" are applied by default, if you pass aPostData.