creating new request using reviewboard API
-
14-11-2019 - |
Question
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.
Solution
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);
}
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow