Package org.b3log.latke.urlfetch

Examples of org.b3log.latke.urlfetch.HTTPResponse


     * @param response the specified Google App Engine HTTP response
     * @return HTTP response
     */
    private static HTTPResponse toHTTPResponse(
            final com.google.appengine.api.urlfetch.HTTPResponse response) {
        final HTTPResponse ret = new HTTPResponse();

        ret.setContent(response.getContent());
        ret.setFinalURL(response.getFinalUrl());
        ret.setResponseCode(response.getResponseCode());

        final List<com.google.appengine.api.urlfetch.HTTPHeader> gaeHTTPHeaders = response.getHeaders();
        for (final com.google.appengine.api.urlfetch.HTTPHeader gaeHTTPHeader : gaeHTTPHeaders) {
            final HTTPHeader header = new HTTPHeader(gaeHTTPHeader.getName(), gaeHTTPHeader.getValue());
            ret.addHeader(header);
        }

        return ret;
    }
View Full Code Here

TOP

Related Classes of org.b3log.latke.urlfetch.HTTPResponse

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.