use of com.google.appengine.api.urlfetch.URLFetchService in project OpenRefine by OpenRefine.
the class AppEngineClientConnection method receiveResponseHeader.
public HttpResponse receiveResponseHeader() {
URLFetchService ufs = URLFetchServiceFactory.getURLFetchService();
try {
_appengine_hresponse = ufs.fetch(_appengine_hrequest);
} catch (java.io.IOException e) {
throw new RuntimeException(e);
}
org.apache.http.HttpResponse apache_response = new BasicHttpResponse(new ProtocolVersion("HTTP", 1, 0), _appengine_hresponse.getResponseCode(), null);
for (HTTPHeader h : _appengine_hresponse.getHeaders()) {
apache_response.addHeader(h.getName(), h.getValue());
}
return apache_response;
}
Aggregations