curl-library
Re: cURL on Windows Xp: "Content-Length Header required" error
From: Daniel Stenberg <daniel_at_haxx.se>
Date: Sat, 10 Jan 2009 12:39:28 +0100 (CET)
Date: Sat, 10 Jan 2009 12:39:28 +0100 (CET)
On Sat, 10 Jan 2009, Tanmay Anjaria wrote:
> Below mentioned are the 3 command line args that I wanted to send to
> YouTube:
>
> curl \
> --location https://www.google.com/youtube/accounts/ClientLogin \
> --data 'Email=testuser&Passwd=testpw&service=youtube&source=Test' \
> --header 'Content-Type:application/x-www-form-urlencoded'
Use curl's --libcurl option to get a rough C version of the same thing.
--header is not needed as it sets the same header libcurl will use anyway.
CURLOPT_URL, CURLOPT_FOLLOWLOCATION and CURLOPT_POSTFIELDS seems to be about
the only options you need.
Oh, and perhaps CURLOPT_WRITEFUNCTION etc to get the response back in some way
you like.
-- DanielReceived on 2009-01-10