How can we call a url with basic authentication using internal module 'download' function?
On Monday, January 6, 2014 at 2:57:05 AM UTC+5:30, Michael Hackstein wrote: > > Hi Bogdan, > > there is a function in our "internal" module for this, which we use e.g. > for downloading foxx apps from their github repository. > > You have two options in your Foxx Controller: > 1) > > var internal = require("internal"); > internal.download(url, body, options, path-to-outfile); > > Replace the url and body accordingly. > The body of the answer will be written to outfile. > Options is a JSON object to define header options e.g. {"method": "GET"} > > 2) > > var internal = require("internal"); > var result = internal.download(url, body, options); > > result will then contain the complete result (including: headers, body, > status etc.) > > > hope that helps, > > best > Michael > > > Am 05.01.2014 um 13:27 schrieb Bogdan P. <ice.b...@gmail.com <javascript:> > >: > > Hello, > > Is there a way to make external http calls from within a foxx controller? > I'm thinking something like the http.request() in node.js. I need my foxx > app to connect a 3rd party rest service. > > Best regards, > Bogdan Popa > > -- > You received this message because you are subscribed to the Google Groups > "ArangoDB" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to arangodb+u...@googlegroups.com <javascript:>. > For more options, visit https://groups.google.com/groups/opt_out. > > > -- You received this message because you are subscribed to the Google Groups "ArangoDB" group. To unsubscribe from this group and stop receiving emails from it, send an email to arangodb+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.