cURL / Mailing Lists / curl-users / Single Mail

curl-users

Re: Post File to HTTPS via cURL at command line

From: Daniel Stenberg <daniel-curl_at_haxx.se>
Date: Tue, 14 Jun 2005 23:08:18 +0200 (CEST)

On Tue, 14 Jun 2005, Amy Petri wrote:

> For months I have been trying to figure out a command line cURL method of
> posting a file to a secure site. The file must be POSTed, and a user name
> and password are required to login. Can anyone tell me what my potential
> problem could be with the below command? Any help is greatly appreciated.
>
> curl -v -k -# -u username:password \
> https://www.somesite.com{/incoming/} \
> -F File=@/tmp/xmlfile.nrq \
> -A "Mozilla/4.0"

Are you supposed to provide the user name and password like this?

Are you supposed to do a multipart form upload?

Why the {}-braces ?

I suggest you first make the post manually with firefox and record the
operation with LiveHTTPHeaders, then it is a piece of cake to make curl repeat
it.

-- 
  Commercial curl and libcurl Technical Support: http://haxx.se/curl.html
Received on 2005-06-14