在印象笔记中获取 411 错误错误请求 [英] Getting 411 error bad request in Evernote

查看:49
本文介绍了在印象笔记中获取 411 错误错误请求的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们有三个环境,Dev、QA 和 Prod.

We have three environments, Dev, QA and Prod.

我们有一个稳定的 PHP 运行,它与 evernote 连接,获取令牌并获取内容.

We have a stable PHP running that connects with evernote , get token and fetch content.

我们将 QA 环境更新为 PHP 7.0,现在当我们尝试通过 evernote 获取令牌时,它会返回

we updated our QA environment to PHP 7.0 and now when via evernote when we try to fetch Token it returns

Invalid auth\/bad request (got a 411, expected HTTP\/1.1 20X or a redirect)

这是代码

 $oauth = new \OAuth($this->consumerKey, $this->consumerSecret);

        return $oauth->getRequestToken($this->getEndpoint('oauth'), $callbackUrl);

我已经检查过 consumerKey 等,一切都正确.

I have checked that consumerKey etc and everything is correct.

我不确定这里会出现什么错误,因为 411 通常是您需要发送内容长度的时候,但是在 Evernote API 中,他们没有提到这样的事情

I am not sure what error could be here since 411 is normally when you need to send content length, but in Evernote API they dont mention anything like this

这是因为 PHP 7.0 吗?

Is this due to PHP 7.0 ?

任何帮助将不胜感激

谢谢

推荐答案

是的,您可能需要发送内容长度.Evernote 是否更改了 Content-Length 的 API 验证?

Yes, you probably need to send the content length. Does Evernote change the API validation for the Content-Length?

我看到 Github 上提出了另一种解决方法.

I see there is another workaround proposed on Github.

这篇关于在印象笔记中获取 411 错误错误请求的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆