curl-library
Re: PUT data (not file) - can't make it work
From: Daniel Stenberg <daniel_at_haxx.se>
Date: Wed, 12 Mar 2008 23:50:43 +0100 (CET)
Date: Wed, 12 Mar 2008 23:50:43 +0100 (CET)
On Wed, 12 Mar 2008, Tiberiu Motoc wrote:
> 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).
libcurl adds that header by default for normal POSTs but not for PUT as it
doesn't make sense to do that. A normal PUT isn't even urlencoded.
So if you really need it in the PUT request, you need to add it manually.
-- Commercial curl and libcurl Technical Support: http://haxx.se/curl.htmlReceived on 2008-03-12