cURL / Mailing Lists / curl-users / Single Mail

curl-users

Re: Posting with ----data-urlencode

From: Kyle Welsh <kywelsh_at_gmail.com>
Date: Mon, 13 Sep 2010 21:59:33 +0100

I believe I need a multipart frompost.
Just having problem with filling in a box with spaces, line breaks and returns.

When I try encode it manually it does not seem to work.
E.G.
-F "This%20is%20a%20string"

On Mon, Sep 13, 2010 at 9:46 PM, Daniel Stenberg <daniel_at_haxx.se> wrote:
> On Mon, 13 Sep 2010, Kyle Welsh wrote:
>
>> Hey, having problems with the usage of --data-urlencode <data>
>>
>> By statement is:
>>
>> curl -v -s -b /home/<user>/cookies.txt -F Student_ID=262144  -F
>> file=@$Dir/user.jpeg   -F name=$name ---data-urlencode bio="String of words"
>> "http://www.example.com/takeuser.php"
>
> You cannot mix --data-urlencode (that uses two dashes and nothing else) with
> -F. They build do different data chunks to send with a POST. Make up your
> mind, do you want a multipart formpost (-F) or a "regular" one
> (-d/--data/--data-urlencode)?
>
> --
>
>  / daniel.haxx.se
> -------------------------------------------------------------------
> List admin: http://cool.haxx.se/list/listinfo/curl-users
> FAQ:        http://curl.haxx.se/docs/faq.html
> Etiquette:  http://curl.haxx.se/mail/etiquette.html
>
>
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-users
FAQ: http://curl.haxx.se/docs/faq.html
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2010-09-13