curl-library
Re: Performing a GET request with body data
From: Daniel Stenberg <daniel_at_haxx.se>
Date: Tue, 11 Dec 2007 22:10:14 +0100 (CET)
Date: Tue, 11 Dec 2007 22:10:14 +0100 (CET)
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.htmlReceived on 2007-12-11