cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: GET Requests with content payload

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Wed, 11 Jun 2014 22:44:52 +0200 (CEST)

On Wed, 11 Jun 2014, Pedro Cordeiro wrote:

> cURL allows it:
>
> $ curl -X GET http://dev.pedro.sicneo -d "teste" -v

...

> I was wondering how to do this with libcurl. Someone replied on
> stackoverflow this is not allowed (and I'm quite sure it is)

Yes it is most certainly allowed! It's just that it is unusual so curl and
libcurl don't have it streamlined.

> and it seemed inconsistent that I can do this with cURL but not with
> libcurl.

Yeps. Of course libcurl can do it!

Slap on "--libcurl getbody.c" on that command line and you'get a C program
generated for you that shows you how it is done!

-- 
  / daniel.haxx.se
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette:  http://curl.haxx.se/mail/etiquette.html
Received on 2014-06-11