cURL / Mailing Lists / curl-users / Single Mail

curl-users

Re: "POST" option related question using cURL.

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Tue, 21 Oct 2003 08:15:40 +0200 (CEST)

On Mon, 20 Oct 2003, Suhas Tembe wrote:

> 1). I first recorded the cookies as:
> curl -D cook.txt http://supplyweb.trw.com/supplyweb/general/default.asp

We generally recommend -c to store cookies in a more failsafe way. Or more
specificly, reading cookies saved with -c is more failsafe than cookies saved
with -D.

> 2). I then decided to use the cook.txt & post as:
>
> curl -b cook.txt -d
> "UserAccount=USER&AccessCode=PASSWORD&Locale=en-us&TimeZone=PST%3A-480&action-Submit=Login"
> http://supplyweb.trw.com/supplyweb/general/default.asp
>
> This doesn't seem to have worked, because I see the default.asp page being
> scrolled.

Use -v and check if that cookie you saved in step 1 was sent off.

> How do I know that I am logged-in?

I don't know. How do you know when you use a browser?

> Am I doing something wrong?

No one but you can tell. If you just act exactly as your browser does when you
login, you should be logged in fine.

> The next step I would like to do after I "log in" is do a GET using:
> http://supplyweb.trw.com/InventoryStatus.asp?cboSupplier=SUPPLIERNUM&status=all&action-select=Query

Usually that's not a problem if you've logged in and have all the cookies etc
saved so that the site considers you OK for it.

-- 
 Daniel Stenberg -- curl: been grokking URLs since 1998
-------------------------------------------------------
This SF.net email is sponsored by OSDN developer relations
Here's your chance to show off your extensive product knowledge
We want to know what you know. Tell us and you have a chance to win $100
http://www.zoomerang.com/survey.zgi?HRPT1X3RYQNC5V4MLNSV3E54
Received on 2003-10-21