An update: 

I realize now that I need to use the ajaxauth/login address for logging in, 
and I can't get this to work:

post("https://www.space-track.org/ajaxauth/login 
<https://www.space-track.org/auth/login>
",data="identity=username&password=password")
Response(401 Unauthorized, 11 Headers, 69 Bytes in Body)

I tried this with the Python requests package, and it worked as expected:

cred = {'identity':'username' , 'password':'password'}
r = requests.post("https://www.space-track.org/ajaxauth/login",data = cred)
(Response 200)

the body of the request is the same (except that password comes before 
username). 

Is it likely that this is a Requests.jl bug, or is it more likely this is a 
server-side issue?


On Saturday, September 19, 2015 at 7:53:05 PM UTC-4, Chris wrote:
>
> I have not been able to find much in the way of examples for Requests.jl 
> beyond what's in the README. My issue is with this site: 
> https://www.space-track.org/documentation#/howto. I can use post("
> https://www.space-track.org/auth/login",data="identity=username&password=password";),
>  
> and this seemingly works (I get "Response(200 OK, 10 headers, 10676 bytes 
> in body)").
>
> When I try to run a query with get(...), however, I get "Response(401 
> Unauthorized, 10 headers, 94 bytes in body)". I've tried different things, 
> including get("<query URL>") and get("<query url>"; cookies = 
> resp.cookies), where resp is the output of the previous post() command. 
> What do I need to do here?
>
> Thanks,
> Chris
>

Reply via email to