Reduced amount of logging of outgoing http requests.

This commit is contained in:
Winston Li 2015-01-10 08:59:04 +00:00
parent 26e2b1262d
commit 0ce8cc074e

View file

@ -62,10 +62,12 @@ public abstract class Request<T extends Result> {
}
private void performGetRequest() {
System.out.println("GET -> " + url);
request(new AsyncHttpClient().prepareGet(url));
}
private void performPostRequest() {
System.out.println("POST -> " + url);
request(new AsyncHttpClient().preparePost(url).setBody(getPostBody()).setHeader("Content-Type", "application/json"));
}
@ -74,7 +76,7 @@ public abstract class Request<T extends Result> {
@Override
public T onCompleted(Response response) throws Exception {
System.out.println("Response: " + response.getResponseBody());
System.out.println("Response -> " + url);
return parseResponse(new Gson().fromJson(response.getResponseBody(), JsonElement.class));
}