【发布时间】:2011-07-10 02:48:40
【问题描述】:
与此处描述的 Expect Continue 问题 C# HTTP POST Returns Error: 417 "Expectation Failed." 非常相似,我在尝试使用 Android 中的 HttpPost 对象发布到服务器时收到“Expectation Failed”错误。
【问题讨论】:
与此处描述的 Expect Continue 问题 C# HTTP POST Returns Error: 417 "Expectation Failed." 非常相似,我在尝试使用 Android 中的 HttpPost 对象发布到服务器时收到“Expectation Failed”错误。
【问题讨论】:
阻止请求使用“期望继续”的等效修复似乎是这样的:
httpPostInstance.getParams().setParameter(
CoreProtocolPNames.USE_EXPECT_CONTINUE,
Boolean.FALSE);
我在 1.6.1 下的 http://hc.apache.org/httpcomponents-client-ga/tutorial/html/fundamentals.html 找到了这个。
【讨论】: