cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: libcurl question

From: Dan Fandrich <dan_at_coneharvesters.com>
Date: Tue, 20 Jan 2004 17:31:46 -0800

On Tue, Jan 20, 2004 at 03:14:52PM -0500, Nicholas wrote:
> Hi All,
>
>
>
> I have a quick question regarding the first line
>
> of a HTTP POST request when using libcurl.
>
>
>
> I am using libcurl version 7.10.5 on a linux platform and
>
> right now the first line of the HTTP request is getting sent
>
> as:
>
> POST / HTTP/1.1
>
>
>
> I would like it to send the following for the first line:
>
> POST /AUTHORIZE HTTP/1.1
>
>
>
> The documentation on the curl web site about
>
> CURLOPT_HTTPHEADER says:
>
> "The first line in a request (usually containing a GET or POST) is not a header and cannot be replaced using this option. Only the lines following the request-line are headers."
>
>
>
> So does anyone know how can I change this first line?

That line is, of course, extracted from the URL. Change the URL you're
setting with the CURLOPT_URL option to include the string you want after
the host name, e.g. http://www.example.com/AUTHORIZE

>>> Dan

-- 
http://www.MoveAnnouncer.com              The web change of address service
          Let webmasters know that your web site has moved
-------------------------------------------------------
The SF.Net email is sponsored by EclipseCon 2004
Premiere Conference on Open Tools Development and Integration
See the breadth of Eclipse activity. February 3-5 in Anaheim, CA.
http://www.eclipsecon.org/osdn
Received on 2004-01-21