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's picture

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.