curl-library
Re: PUT data (not file) - can't make it work
Date: Wed, 12 Mar 2008 15:41:19 -0700
Hi Daniel,
Thanks for the reply.
Yes, there is no difference in the way you read files, and the way you read
data. I actually had a bug in my code, and I was setting the FIELDSIZE = 15
bytes, however I was only returning 12 bytes in my callback function. This
was causing my server to time-out waiting to receive the remaining 3 bytes.
I had one more problem. I had to set the "Content-Type" header to
"application/x-www-form-urlencoded". I don't really understand why I need to
do this. I don't do it in POST. What should I have to do it in PUT? (Maybe
this is not even a CURL issue, maybe it is a server&framework issue).
And yes, my function was defined as static, but what I posted was the
definition.
Thanks again,
Tiberiu
Received on 2008-03-12