Door Games Unlimited

Welcome, Guest.


Subject: http.js Date: Sat Mar 01 2014 15:14:39
From: Deuce To: Kirkman

  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!)

Previous Message       Next Message
In Reply To: http.js (Kirkman)
Replies: http.js (Kirkman)