【问题标题】:"417: Expectation Failed" on HTTPPostHTTPPost 上的“417:预期失败”
【发布时间】:2011-07-10 02:48:40
【问题描述】:

与此处描述的 Expect Continue 问题 C# HTTP POST Returns Error: 417 "Expectation Failed." 非常相似,我在尝试使用 Android 中的 HttpPost 对象发布到服务器时收到“Expectation Failed”错误。

【问题讨论】:

    标签: android http-post


    【解决方案1】:

    阻止请求使用“期望继续”的等效修复似乎是这样的:

    httpPostInstance.getParams().setParameter(
        CoreProtocolPNames.USE_EXPECT_CONTINUE,
        Boolean.FALSE);
    

    我在 1.6.1 下的 http://hc.apache.org/httpcomponents-client-ga/tutorial/html/fundamentals.html 找到了这个。

    【讨论】:

    • 伟大的工作伙伴。我的期望没有失败:)。它继续。
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2012-02-25
    • 2012-06-27
    • 1970-01-01
    • 2015-06-08
    • 1970-01-01
    • 1970-01-01
    • 2015-11-18
    相关资源
    最近更新 更多