cURL / Mailing Lists / curl-users / Single Mail

curl-users

Re: sending "multiline" post?

From: Daniel Stenberg <daniel-curl_at_haxx.se>
Date: Mon, 5 Sep 2005 14:23:59 +0200 (CEST)

On Mon, 5 Sep 2005, Lolita wrote:

> how can i send post to look like this
> http://img400.imageshack.us/my.php?image=gzpeknejsivec9ql.gif ?
>
> i tried curl -0 -A "Mozilla/4.0 (compatible; Synapse)" -d
> "$FORMAT$=GameList" -d "$VER$=1.01" -d "PLAYER=Lolita*" -d "ID=5056295546"
> -d "T=16" http://80.188.162.104:26500/cgi-bin/gameserver.cgi but it sends it
> like it is in manual "$FORMAT$=GameList&$VER$=1.01" ....

Yes, that's how -d does when you use write multiple ones.

You should instead add the whole post in a single string with embedded
newlines like:

   -d "foo\nmooo\nlalalal\n"

or have a file pre-written that you can post:

  $ cat file
  name=moo
  age=none
  iq=13
  $ curl -d @file http://postdasite.com/

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