cURL / Mailing Lists / curl-users / Single Mail


Re: Posting with ----data-urlencode

From: Daniel Stenberg <>
Date: Mon, 13 Sep 2010 23:04:41 +0200 (CEST)

On Mon, 13 Sep 2010, Kyle Welsh wrote:

Please don't top-post.

> 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"

That's not how it works.

First, use LiveHTTPHeaders and see what your browser does. There you'll learn
that multipart formposts sends the data as-is unencoded and just separates the
data pieces with separators. -F "name=this is a string" is how it is supposed
to be done.

Of course, if you want to feed newlines you'll need to play with your command
line or use other curl tricks like -F "name=<filename" or similar.

List admin:
Received on 2010-09-13