Hi,
most probably the quickest way to achieve this is to set the
`WWW-Authenticate`-header for auth/basic authentification as documented
here:
https://en.wikipedia.org/wiki/Basic_access_authentication
Cheers,
Willi
On Monday, November 20, 2017 at 8:14:32 AM UTC+1, Karan Kapur wrote:
>
> "code": 400, "message": "Bad Request", "headers": { "connection":
> "keep-alive", "content-length": "163", "x-found-handling-server":
> "10.145.194.175", "x-found-handling-instance": "instance-0000000004", "
> server": "fp/43e8d0", "http/1.1": "400 Bad Request", "
> x-found-handling-cluster": "f99b5b6a08b843b17ccf3507723a1ac8", "date": "Mon,
> 20 Nov 2017 07:11:49 GMT", "content-type": "application/json;
> charset=UTF-8"
>
> Getting this error for elastic cloud url
>
>
> https://f99b5b6a08b843b17ccf3507723a1ac8.us-east-1.aws.found.io:9243/arango/error
>
> Its working fine on postman though;
>
> On Monday, November 20, 2017 at 12:22:04 PM UTC+5:30, Karan Kapur wrote:
>>
>> 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. <[email protected]>:
>>>
>>> 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 [email protected].
>>> 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 [email protected].
For more options, visit https://groups.google.com/d/optout.