1

REST API 2.0 (rb 1.6.3 バージョン用) を使用して新しいレビュー リクエストを作成するためのドキュメントが見つかりません。どんなポインタでも大歓迎です。

4

1 に答える 1

1

どうでも。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);
}
于 2012-03-01T17:49:47.380 に答える