cURL / Mailing Lists / curl-users / Single Mail

curl-users

POST file with several requests (HTTP 1.1)

From: Alexandre Vieira <nullpt_at_gmail.com>
Date: Mon, 2 Aug 2010 16:38:22 +0100

Hi all,

I need to submit several POSTs in a row in a single connection (i.e HTTP 1.1
persistent connection).

I've tried:

/usr/local/bin/curl -s --user-agent "MyUserAgent/3.0/1.0" --basic --user
myuser:mypasswd --header "Pragma: no-cache" --header "Cache-Control:
no-cache" --header "Connection: keep-alive" --header "Content-Type:
text/xml" --header "Accept: text/html, image/gif, image/jpeg, *; q=.2, */*;
q=.2" --data @foobar http://192.168.100.10:20010/MyApp

Where foobar contains two different POST (xml) requests separated by a CRLF.

When I execute the command it will post my first request but ignore the
second line of the file.

Is it possible to send all the requests in the file?

Thanks in advance
BR
Alex

-------------------------------------------------------------------
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-08-02