Search in sources :

Example 1 with URLFetchService

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;
}
Also used : BasicHttpResponse(org.apache.http.message.BasicHttpResponse) URLFetchService(com.google.appengine.api.urlfetch.URLFetchService) HttpResponse(org.apache.http.HttpResponse) ProtocolVersion(org.apache.http.ProtocolVersion) HTTPHeader(com.google.appengine.api.urlfetch.HTTPHeader)

Aggregations

HTTPHeader (com.google.appengine.api.urlfetch.HTTPHeader)1 URLFetchService (com.google.appengine.api.urlfetch.URLFetchService)1 HttpResponse (org.apache.http.HttpResponse)1 ProtocolVersion (org.apache.http.ProtocolVersion)1 BasicHttpResponse (org.apache.http.message.BasicHttpResponse)1