Skip to content

Commit

Permalink
Update call sites to httpclient.execute
Browse files Browse the repository at this point in the history
  • Loading branch information
shs96c committed Jan 18, 2018
1 parent fe1307e commit f907cd5
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ public Response execute(Command command) throws IOException {
HttpRequest httpRequest = commandCodec.encode(command);
try {
log(LogType.PROFILER, new HttpProfilerLogEntry(command.getName(), true));
HttpResponse httpResponse = client.execute(httpRequest, true);
HttpResponse httpResponse = client.execute(httpRequest);
log(LogType.PROFILER, new HttpProfilerLogEntry(command.getName(), false));

Response response = responseCodec.decode(httpResponse);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ private Optional<Result> createSession(HttpClient client, InputStream newSession
request.setHeader(CONTENT_TYPE, JSON_UTF_8.toString());
request.setContent(newSessionBlob);
long start = System.currentTimeMillis();
HttpResponse response = client.execute(request, true);
HttpResponse response = client.execute(request);
long time = System.currentTimeMillis() - start;

// Ignore the content type. It may not have been set. Strictly speaking we're not following the
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ public String create(Page page) {
HttpRequest request = new HttpRequest(HttpMethod.POST, "/common/createPage");
request.setHeader(CONTENT_TYPE, JSON_UTF_8.toString());
request.setContent(data);
HttpResponse response = client.execute(request, true);
HttpResponse response = client.execute(request);
return response.getContentString();
} catch (IOException ex) {
throw new RuntimeException(ex);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ protected void doGet(HttpServletRequest req, HttpServletResponse resp)
try {
HttpClient client = createFactory().createClient(server.getURI().toURL());
HttpRequest request = new HttpRequest(HttpMethod.GET, "/foo");
return client.execute(request, true);
return client.execute(request);
} finally {
server.stop();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ private synchronized void startServers() {
HttpRequest req = new HttpRequest(HttpMethod.GET, "/status");
HttpResponse response = null;
try {
response = c.execute(req, true);
response = c.execute(req);
} catch (IOException e) {
throw new RuntimeException(e);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ public void handle(HttpRequest req, HttpResponse resp) throws IOException {

@VisibleForTesting
HttpResponse makeRequest(HttpRequest request) throws IOException {
return client.execute(request, true);
return client.execute(request);
}

private void copyToServletResponse(HttpResponse response, HttpResponse resp)
Expand Down

0 comments on commit f907cd5

Please sign in to comment.