cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: FW: Https and curl

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Thu, 5 Jun 2003 16:21:11 +0200 (CEST)

On Thu, 5 Jun 2003 Vassilevich_Misha_at_emc.com wrote:

You are obviously looking for info on libcurl, then please use the
curl-library list instead, it'll make you reach the correct crowd.

> I am currently looking to use HTTPS withing curl library using C language I
> have couple questions I would really appreciate any reply :

Your questions seem like you haven't read any docs or information from the
web page. Most of what you're asking is easily available in docs and example
source codes.

We spend lots of energy and sweat to write docs and examples. The least you
can do is try them out first.

> 1) How to set-up curl programmatically to use SSH (i.e what functions to
> call to initialise SSL... )

libcurl doesn't do SSH, it does SSL. And only if openssl is present. See
http://curl.haxx.se/libcurl/c/curl_easy_setopt.html for all the options, or
check out the tutorial: http://curl.haxx.se/libcurl/c/the-guide.html

> 2) I want to send HTTP Header of the following format i don't want to use
> Curl default one :
>
> /test/Mytest HTTP/1.0

I would assume that you rather have POST in there too, as this isn't a valid
HTTP request.

> Host: x.x.x.x:443
> Content-Type: text/xml
> Content-Length: 411
> XXXXXUser: nasadmin
> XXXXXXAction: mtr

Set http version and use your own set of custom headers. Again, the
curl_easy_setopt man page tells you how.

> 3) After i build the header i want to add body to HTTP request wich is the
> following XML format .

You can post whatever data you please, using any kind of encoding. libcurl
doesn't care. It sends it off binary.

> 4) Send it header + body . What fuction to call ?

Most simple: curl_easy_perform(), like any example source code shows.

> 5) What function to call in order check the response .

curl_easy_perform() of course returns error code, you get the response data
to the function you provide. As the tutorial describes.

-- 
 Daniel Stenberg -- curl: been grokking URLs since 1998
-------------------------------------------------------
This SF.net email is sponsored by:  Etnus, makers of TotalView, The best
thread debugger on the planet. Designed with thread debugging features
you've never dreamed of, try TotalView 6 free at www.etnus.com.
Received on 2003-06-05