Re: http.js
By: Kirkman to All on Fri Feb 28 2014 12:52 pm
Does http.js allow for customization of the headers sent in a request?
Absolutely, you need to create the request, modify it, then send it like so:
req = new HTTPRequest();
req.SetupGet("
http://example.com");
req.request_headers.push("X-Magic: More magic");
req.SendRequest();
req.ReadResponse();
response = req.body;
Have a look at the Get() method in http.js for how to do auth and such.
---
http://DuckDuckGo.com/ a better search engine that respects your privacy.
þ Synchronet þ My Brand-New BBS (All the cool SysOps run STOCK!)