我正在使用 Chilkat 9.5.0.75 x86-vc10-sp1(并且也在 9.5.0.76 上测试过)。我需要使用需要为空主体的 PUT 和 DELETE 调用指定 Content-Length 的 web 服务。我从旧论坛阅读了这个http://www.chilkatforum.com/questions/5485/need-content-length0-http-header-even-when-message-is-empty/5528 ,但我仍然有这个问题。有什么解决方法吗?这就是我进行 PUT 调用的方式
CkHttp http;
if (!http.UnlockComponent(CK_UNLOCKCODE)) return false;
http.put_SessionLogFilename("http.txt");
http.AddQuickHeader("X-Authorization", authToken);
http.AddQuickHeader("Accept", "application/json");
CkString os;
http.QuickPutStr(endpoint, os);
int res = http.get_LastStatus();
谢谢你的任何建议