• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
do shell script, curl and cookies
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Follow-Ups:
    • Re: do shell script, curl and cookies
      • From: Axel Luttgens <email@hidden>
    • Re: do shell script, curl and cookies
      • From: Doug McNutt <email@hidden>
  • Prev by Date: Re: another beginner's question
  • Next by Date: Re: GIF to PDF with Applescript ONLY
  • Previous by thread: Re: another beginner's question
  • Next by thread: Re: do shell script, curl and cookies
  • Index(es):
    • Date
    • Thread