cURL / Mailing Lists / curl-users / Single Mail

curl-users

Re: new line in command promt

From: Eric Bioul <ericbioul_at_hotmail.com>
Date: Wed, 1 Dec 2004 23:12:59 +0100

thx for the fast response!!
goodnight

Eric

----- Original Message -----
From: "Daniel Stenberg" <daniel-curl_at_haxx.se>
To: "curl tool talk" <curl-users_at_cool.haxx.se>
Sent: Wednesday, December 01, 2004 8:17 PM
Subject: Re: new line in command promt

> On Wed, 1 Dec 2004, eric bioul wrote:
>
> > But what should I do when needing this?
> >
> > post www.google.com
> > content length=150
> > ...
> > connection=keep alive
> > amaai kroket [enter or new line]
> > [enter or new line]
> > das moeilijk
> >
> > Does anyone know the answer or a place where I can find this sollution?
>
> If you *really* want a newline in the data, perhaps your shell supports
> something like
>
> curl -d "line1\nline2" [URL]
>
> Or you can create a file with all the post data and you post it with
>
> curl --data-binary @filename [URL]
>
> BUT note that -d post data is supposed to be "URL-encoded" already. The
> receiving end will decode %XX-codes. Thus, you can provide a newline with
%0a
> and a carriage return (should you want that) with %0d. Like:
>
> curl -d "line1%0dline2" [URL]
>
> --
> Daniel Stenberg -- http://curl.haxx.se -- http://daniel.haxx.se
> Dedicated custom curl help for hire: http://haxx.se/curl.html
>

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.804 / Virus Database: 546 - Release Date: 30/11/2004
Received on 2004-12-01