无法获取具有相同参数的多个实例的问题列表

Can't get list of issues with multiple instances of the same parameter

本文关键字:实例 列表 问题 参数 获取      更新时间:2023-09-26

我试图通过OAuth.js (http://oauth.googlecode.com/svn/code/javascript/)的REST API从Bit Bucket获得问题列表。我用

签署每个请求
OAuth.completeRequest(message, accessor);

消息

message: {
  action: "https://api.bitbucket.org/1.0/repositories/owner/reponame/issues",
  method: "GET",
  parameters: p;
};

p包含不同名称的参数时,一切正常:

p = [['status','open'],['priority','high']]

但是当p包含与

同名的参数时
p = [['status','open'],['status','resolved']]

,服务器响应401 UNAUTHORIZED。Bitbucket API支持同一参数的多个实例:

可以查询同一参数的多个实例。系统将同一参数的多个实例视为整个过滤器查询的OR。例如,下面的过滤器查找标题中带有For字样的打开的和已解决的错误:

status=open&kind=!bug&status=resolved&title=~for 

我认为这个问题在OAuth.js库的签名方法的某个地方,但找不到它。

这是bitbucket端的一个bug:https://bitbucket.org/site/master/issue/7009/you-cannot-use-multiple-identical-query