1
0
Fork 0

Overload..

master
Kyle Chaplin 2013-08-24 18:57:53 -05:00
parent 3a65c6f61a
commit 2d18abf36e
2 changed files with 18 additions and 1 deletions

View File

@ -717,7 +717,7 @@ public final class Issue extends Resource {
public void vote() throws JiraException {
try {
restclient.post(getRestUri(key) + "/votes", new JSONObject());
restclient.post(getRestUri(key) + "/votes");
} catch (Exception ex) {
throw new JiraException("Failed to vote on issue " + key, ex);
}

View File

@ -295,6 +295,23 @@ public class RestClient {
return post(buildURI(path), payload);
}
/**
* Executes an HTTP POST with the given path.
*
* @param path Path to be appended to the URI supplied in the construtor
*
* @return JSON-encoded result or null when there's no content returned
*
* @throws RestException when an HTTP-level error occurs
* @throws IOException when an error reading the response occurs
* @throws URISyntaxException when an error occurred appending the path to the URI
*/
public JSON post(String path)
throws RestException, IOException, URISyntaxException {
return post(buildURI(path), new JSONObject());
}
/**
* Executes an HTTP POST with the given path and file payload.
*