cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: Converting shell level curl to libcurl (linux)

From: Michael Wood <esiotrot_at_gmail.com>
Date: Fri, 5 Aug 2011 18:04:13 +0200

Hi

On 5 August 2011 15:45, <Jeremy.Levine_at_interactivedata.com> wrote:
>
> I have a  working  curl scripts  I would like to convert to lib curl bellow
> is an example of one
>
>
>  curl     \
>  -k -d@/home/test/curl/login.req.xml\
>
> -H"SOAPAction:/Serv/9999/Interface/Service9999.serviceagent/portTypeEndpoint/LogInOp"
>  \
>
>  https://10.111.11.20:443/Serv/9999/Interface/Service9999.serviceagent/portTypeEndpoint

Try adding "--libcurl example.c" on the end of that "curl" command
line. Then curl will create an "example.c" file that should do
basically the same thing. You can then edit that to neaten it up and
add any additional functionality.

i.e.:

curl -k -d@/home/test/curl/login.req.xml \
  -H"SOAPAction:/Serv/9999/Interface/Service9999.serviceagent/portTypeEndpoint/LogInOp"
\
  https://10.111.11.20:443/Serv/9999/Interface/Service9999.serviceagent/portTypeEndpoint
\
  --libcurl example.c

-- 
Michael Wood <esiotrot_at_gmail.com>
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette:  http://curl.haxx.se/mail/etiquette.html
Received on 2011-08-05