curl-users
RE: New User - Help with https POST
Date: Mon, 18 Nov 2002 08:16:10 -0600
That's it, thanks! One more question though... I have to send this file up
without the CR/LF that are attached to it by the creator. I tried to use
'--data-binary option', but that returns "You can only select one HTTP
request!" Is there a way I can accomplish this, or will I need to alter the
file before attempting to send it.
Thanks for the help!
Mark
-----Original Message-----
From: Daniel Stenberg [mailto:daniel_at_haxx.se]
Sent: Sunday, November 17, 2002 1:54 PM
To: Curl Mailinglist
Subject: Re: New User - Help with https POST
On Fri, 15 Nov 2002, Mark Hill wrote:
> I am attempting to post a file to a https site, the HTML looks like below.
> Does this look like it should work?
>
> curl -v -F "UserId=myname" -F "Password=mypasswd" -F "UploadType=P" -F
> "VersionNumber=V4R1" -F "ResponseType=TEXT/HTML" -F "AppVersion=2.0" -F
> "AcceptLicenseAgreement=YES" -F "Flags=1111111" -F "Filename=MYFILE.TXT"
-F
> "hmuPUSSubmitBtn=Upload File" https://www.pld.ups.com/ha/cgi-bin/kdwstrp2
Almost. Since the actual file upload is the field named 'Filename' and you
probably want to upload the local file 'MYFILE.TXT' you should make that -F
be "Filename=@MYFILE.TXT" using an @-letter to indicate that this should be
read from the file named MYFILE.TXT.
-- Daniel Stenberg -- curl, cURL, Curl, CURL. Groks URLs. ------------------------------------------------------- This sf.net email is sponsored by: To learn the basics of securing your web site with SSL, click here to get a FREE TRIAL of a Thawte Server Certificate: http://www.gothawte.com/rd524.html ------------------------------------------------------- This sf.net email is sponsored by: To learn the basics of securing your web site with SSL, click here to get a FREE TRIAL of a Thawte Server Certificate: http://www.gothawte.com/rd524.htmlReceived on 2002-11-18