谷歌阅读器API的URL长度限制
我正在使用“/reader/api/0/stream/items/ids”API 来获取我想要的源的项目 ID。
我有相当多的来源,所以我重复“s=”参数以包含在 api url 中。
然而,谷歌给了我一个错误“URL 太长”。
所以问题是我该如何解决这个问题,以便我只使用一次 api 调用来获取这么多来源的项目 id?
谢谢
I am using "/reader/api/0/stream/items/ids" API to get the item ids for sources that I want.
I have quite a number of sources, so I repeated "s=" parameter to include in the api url.
However, google has given me an error of "URL is too long".
So the question is that How can I solve it so that I just use one time api call to get item ids for that many sources?
Thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
似乎
/reader/api/0/stream/items/ids
路径支持POST
方法。这意味着使用POST
动词可以传递的数据量比使用查询字符串和GET
方法传递的数据量要多得多。因此,请使用帖子的
https://www.google.com/reader/api/0/stream/items/ids
网址,并将查询字符串作为帖子数据传递。不要忘记添加操作令牌(T
),这是POST
请求所必需的。It seems that
/reader/api/0/stream/items/ids
path supports aPOST
method. This means the amount of data you could pass by usingPOST
verb is much more than by using a query string and aGET
method.So use
https://www.google.com/reader/api/0/stream/items/ids
URL for the post, and pass your query string as a post data. Don't forget to include an action token(T
) which is required forPOST
requests.