On Tue, Jan 17, 2012 at 11:39:34AM +0530, sukanya c wrote: > Exchange server expects no "Content-Type & Content-Length" header fields > if ther is no content body. > Hence, I cannot set the content-type to wbxml, to avoid libcurl adding the > default header. > > Now my query is "Why Libcurl adds the default Content-type header field, > eventhough there is no request body ".
Are you doing a POST? If so, then, as documented, the default Content-Type for a POST is application/x-www-form-urlencoded. If you want no Content-Type header field at all, then set an empty one using CURLOPT_HTTPHEADER. >>> Dan ------------------------------------------------------------------- List admin: http://cool.haxx.se/list/listinfo/curl-library Etiquette: http://curl.haxx.se/mail/etiquette.html