cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: some questions about cURL

From: Aleksandar Lazic <al-curllibrary_at_none.at>
Date: Tue, 23 Jan 2007 12:38:41 +0100

Hi,

On Die 23.01.2007 16:31, Gupta, Sandeep K wrote:
>
>Can anybody answer for the following questions?
>
>1. How to create HTTP request handle using cURL libraries that contains
>the name of the target resource of the specified HTTP verb, generally a
>file name and HTTP version e.g. HTTP/1.1?

What is a 'HTTP verb'?

If you mean this http://msdn2.microsoft.com/en-us/library/aa383870.aspx

---
'HTTP verb'
The HTTP verb (or HTTP method) is an instruction sent in a request
message that notifies an HTTP server of the action to perform on the
specified resource. For example, "GET" specifies that a resource is
being retrieved from the server. Common verbs include "GET", "POST", and
"HEAD". For more information and a complete list of standard HTTP verbs,
see the HTTP/1.1 specification.
---
As far as I know, yes it is possible to change the HTTP method with
libcurl => CURLOPT_CUSTOMREQUEST.
Why must M$ define some common words into M$ish :-((((
>2. Is there any API which adds one or more HTTP request headers to the
>HTTP request handle else how to add it with cURL?
Have you looked into:
http://curl.haxx.se/libcurl/c/
http://curl.haxx.se/libcurl/c/example.html
http://curl.haxx.se/libcurl/c/libcurl-tutorial.html
>3. Is there any API's to send data instead of file if I want to send
>specific body header and trailer before and after sending the file.
I don't know but I think this isn't possible out of the box, you should
need to write a own function and add it to one of the callback options
in libcurl.
BR
Aleks
Received on 2007-01-23