@Override protected boolean hasResponseBody(Response response) { return HttpEngine.hasBody(response); }
if (!logBody || !HttpEngine.hasBody(response)) { logger.log("<-- END HTTP"); } else if (bodyEncoded(response.headers())) {
/** * Returns an input stream from the server in the case of error such as the * requested file (txt, htm, html) is not found on the remote server. */ @Override public final InputStream getErrorStream() { try { HttpEngine response = getResponse(); if (HttpEngine.hasBody(response.getResponse()) && response.getResponse().code() >= HTTP_BAD_REQUEST) { return response.getResponse().body().byteStream(); } return null; } catch (IOException e) { return null; } }
/** * Returns an input stream from the server in the case of error such as the * requested file (txt, htm, html) is not found on the remote server. */ @Override public final InputStream getErrorStream() { try { HttpEngine response = getResponse(); if (HttpEngine.hasBody(response.getResponse()) && response.getResponse().code() >= HTTP_BAD_REQUEST) { return response.getResponse().body().byteStream(); } return null; } catch (IOException e) { return null; } }
/** * Returns an input stream from the server in the case of error such as the * requested file (txt, htm, html) is not found on the remote server. */ @Override public final InputStream getErrorStream() { try { HttpEngine response = getResponse(); if (HttpEngine.hasBody(response.getResponse()) && response.getResponse().code() >= HTTP_BAD_REQUEST) { return response.getResponse().body().byteStream(); } return null; } catch (IOException e) { return null; } }
if (!logBody || !HttpEngine.hasBody(response)) { log("<-- END HTTP"); } else if (!isResponseBodyPrintable(response)) {