문제

I'm unable to find any doc for creating new review request using rest API 2.0(for rb 1.6.3 version). any pointer is appreciated.

도움이 되었습니까?

해결책

Never mind. I figured it out by going through the postreview.py code. Here is the java equivalent code i wrote.

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);
}
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top