use of br.com.caelum.restfulie.http.HttpURLConnectionContentProcessor in project restfulie-java by caelum.
the class JavaNetDispatcher method access.
private Response access(Request request, String verb, URI uri) {
try {
HttpURLConnection connection = prepareConnectionWith(request.getHeaders(), uri);
connection.setDoOutput(false);
connection.setRequestMethod(verb);
JavaNetResponse response = responseFor(connection, new HttpURLConnectionContentProcessor(connection), request);
return response;
} catch (IOException e) {
throw new RestfulieException("Unable to execute " + uri, e);
}
}
Aggregations