cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: Performing a GET request with body data

From: Scott Rallya <srallya_at_gmail.com>
Date: Tue, 11 Dec 2007 18:53:13 -0500

  Thanks, I'll give that a shot. Yeah, unfortunately its something I have to
deal with even though its against the HTTP RFC. I appreciate the help!

On Dec 11, 2007 4:10 PM, Daniel Stenberg <daniel_at_haxx.se> wrote:

> On Tue, 11 Dec 2007, Scott Rallya wrote:
>
> > Essentially what I have to handle is someone performing a POST request
> but
> > using the GET method instead. That is, a GET request with body data
> after
> > the headers. The way I have it set up is to use the callbacks for
> reading
> > data from a client that's normally called with POST requests, and I need
> > those callbacks to be called if the are using GET instead of POSTs.
>
> That's not a "legal" GET request as per the HTTP RFC then, as a GET has no
> request body. Are you really sure of this?
>
> But you can still make one with libcurl. Just make a regular POST and
> replace
> the actual method keyword to "GET" with CURLOPT_CUSTOMREQUEST.
>
> --
> Commercial curl and libcurl Technical Support: http://haxx.se/curl.html
>
Received on 2007-12-12