do shell script, curl and cookies
do shell script, curl and cookies
- Subject: do shell script, curl and cookies
- From: Håvard Graudo <email@hidden>
- Date: Thu, 11 Apr 2013 16:14:57 +0200
I have problems using cookies with curl via do shell script.
I want to login and get a cookie, then send commands back to the server, including the cookie.
This works in Terminal:
curl --cookie-jar zecookie.txt 'http://www.example.com/login?username=bob&password=pass'
--> login OK, sessionID: 1i7nm0ch6pphezdqkulhdub30 blah blah
curl --cookie zecookie.txt 'http://www.example.com/search?q=something'
--> returns my search. all nice and dandy
The information stored in the cookie is a plain Netscape HTTP Cookie File.
However if I do the SAME THING using 'do shell script' it fails:
do shell script "curl --cookie-jar zecookie.txt 'http://www.example.com/login?username=bob&password=pass'"
--> login OK, sessionID: s04988pspn6otuaaz6xeuooy blah blah
do shell script "curl --cookie zecookie.txt 'http://www.example.com/search?q=ssomething'"
-- NOT LOGGED IN
What works in Terminal does not with 'do shell script'.
Can someone help me in the right direction here?
Thank you
Håvard
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden