basic authentication with http stream

37 views
Skip to first unread message

gilado

unread,
Aug 5, 2013, 6:15:02 PM8/5/13
to js...@googlegroups.com
I'm trying

var s = new Stream('http://user:pa...@myserver.com:8080/mypath');

However that fails

using curl from the command line all is well

$ curl 'http://user:pa...@myserver.com:8080/mypath'

How do I get the content of a page using basic authentication with the Stream object ?

 


auscompgeek

unread,
Nov 7, 2013, 5:13:39 PM11/7/13
to js...@googlegroups.com
Pass an authentication header.

Shanti Rao

unread,
Nov 7, 2013, 5:25:48 PM11/7/13
to js...@googlegroups.com
That's

var s = new Stream("http://server.com:8080",1,{Authorization: "Basic "+encodeB64(user + ":" + password)})



On Monday, August 5, 2013 3:15:02 PM UTC-7, gilado wrote:
I'm trying

var s = new Stream('http://user:pass@myserver.com:8080/mypath');


However that fails

using curl from the command line all is well

Reply all
Reply to author
Forward
0 new messages