• http post call using http.js

    From Dmxrob@VERT/STLWEST to All on Wed Feb 13 19:33:43 2019
    Unfortunately I'm not finding http.js to be documented at all. I've beenãtrying to make a .Post call passing in some parameters and it's just notãworking. Has anyone used http.js to make a .Post call and can shed some light?ããRobããdmxrob þ BBSing from St. Louis, Missouri since 1988ãã---ã þ Synchronet þ Gateway to the West - St. Louis, Missouri - bbs.dmxrob.netã
  • From echicken@VERT/ECBBS to Dmxrob on Fri Feb 15 08:52:44 2019
    Re: http post call using http.jsã By: Dmxrob to All on Wed Feb 13 2019 19:33:43ãã Dm> Unfortunately I'm not finding http.js to be documented at all. I've beenã Dm> trying to make a .Post call passing in some parameters and it's just notã Dm> working. Has anyone used http.js to make a .Post call and can shed someããWould be something like:ããrequire('http.js', 'HTTPRequest');ãconst hr = new HTTPRequest();ãconst response = hr.Post('http://some-url', 'some post data');ãã---ãechickenãelectronic chicken bbs - bbs.electronicchicken.com - 416-425-5435ã þ Synchronet þ electronic chicken bbs - bbs.electronicchicken.comã
  • From Dmxrob@VERT/STLWEST to echicken on Fri Feb 15 10:03:12 2019
    Re: http post call using http.jsã By: echicken to Dmxrob on Fri Feb 15 2019 08:52 amãã > Would be something like:ã >ã > require('http.js', 'HTTPRequest');ã > const hr = new HTTPRequest();ã > const response = hr.Post('http://some-url', 'some post data');ããYes, that much I have already figured out by looking at http.js.ãUnfortunately, I have not determined if "Some post data" will do URL encodingãor if I need to do it first. Is it a string or can it take arrays or dataãsets? Things of that nature.ããI'll tinker with it more today and probably figure it out. Just thought itãmight be documented somewhere what the variable types were, etc.ããRobããdmxrob þ BBSing from St. Louis, Missouri since 1988ãã---ã þ Synchronet þ Gateway to the West - St. Louis, Missouri - bbs.dmxrob.netã
  • From echicken@VERT/ECBBS to Dmxrob on Fri Feb 15 11:08:40 2019
    Re: http post call using http.jsã By: Dmxrob to echicken on Fri Feb 15 2019 10:03:12ãã Dm> Unfortunately, I have not determined if "Some post data" will do URLã Dm> encoding or if I need to do it first. Is it a string or can it take arraysã Dm> or data sets? Things of that nature.ããIt just takes a string and doesn't transform it in any way, IIRC.ããA good enhancement would be to make it take an object instead of a string,ãto take advantage of keys and values. I can mess around with adding that inãlater.ãã---ãechickenãelectronic chicken bbs - bbs.electronicchicken.com - 416-425-5435ã þ Synchronet þ electronic chicken bbs - bbs.electronicchicken.comã