Re: cURL on Windows Xp: "Content-Length Header required" error
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
> 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
-- DanielReceived on 2009-01-10