我无法找到任何使用 Rest API 2.0(适用于 rb 1.6.3 版本)创建新审核请求的文档。任何指针表示赞赏。
最佳答案
没关系。我通过查看 postreview.py 代码弄清楚了这一点。这是我编写的 java 等效代码。
private void createRequest(HttpClient httpClient) throws UnsupportedEncodingException, IOException {
HttpPost post = new HttpPost("http://myreviewboardserver/api/review-requests/");
List<NameValuePair> data = new ArrayList<NameValuePair>();
data.add(new BasicNameValuePair("repository", "https://mysvnrepositorypath"));
post.setEntity(new UrlEncodedFormEntity(data));
HttpResponse response = httpClient.execute(post);
HttpEntity entity = response.getEntity();
entity.writeTo(System.out);
EntityUtils.consume(entity);
}
关于java - 使用reviewboard API创建新请求,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/9492681/