• http.js

    From Kirkman@VERT/GUARDIAN to All on Fri Feb 28 12:52:32 2014
    Does http.js allow for customization of the headers sent in a request?ããI'm playing around with parsing some json apis, and some of them require thatãyou add a header of the form "Bearer " + token.ãã--Joshãã////--------------------------------------------------ãBiC -=- http://breakintochat.com -=- bbs wiki and blogããã---ã þ Synchronetã
  • From Deuce@VERT/SYNCNIX to Kirkman on Sat Mar 1 15:14:39 2014
    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!)ã
  • From Kirkman@VERT/GUARDIAN to Deuce on Sat Mar 1 18:21:14 2014
    Re: http.jsã By: Deuce to Kirkman on Sat Mar 01 2014 03:14 pmãã > 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");ããAwesome. That sounds like exactly what I need!ãã--Joshããã////--------------------------------------------------ãBiC -=- http://breakintochat.com -=- bbs wiki and blogããã---ã þ Synchronetã