public final class GAEURLFetchService extends Object implements URLFetchService
| Modifier and Type | Field and Description |
|---|---|
private static double |
DEFAULT_TIMEOUT
Default fetch timeout, measures in seconds.
|
private static com.google.appengine.api.urlfetch.URLFetchService |
URL_FETCH_SERVICE
URL fetch service.
|
| Constructor and Description |
|---|
GAEURLFetchService() |
| Modifier and Type | Method and Description |
|---|---|
HTTPResponse |
fetch(HTTPRequest request) |
Future<?> |
fetchAsync(HTTPRequest request) |
private static com.google.appengine.api.urlfetch.HTTPRequest |
toGAEHTTPRequest(HTTPRequest request)
Converts the specified HTTP request to a Google App Engine HTTP request.
|
private static HTTPResponse |
toHTTPResponse(com.google.appengine.api.urlfetch.HTTPResponse response)
Converts the specified Google App Engine HTTP response to a HTTP response.
|
private static final com.google.appengine.api.urlfetch.URLFetchService URL_FETCH_SERVICE
private static final double DEFAULT_TIMEOUT
public HTTPResponse fetch(HTTPRequest request) throws IOException
fetch in interface URLFetchServiceIOExceptionpublic Future<?> fetchAsync(HTTPRequest request)
fetchAsync in interface URLFetchServiceprivate static HTTPResponse toHTTPResponse(com.google.appengine.api.urlfetch.HTTPResponse response)
response - the specified Google App Engine HTTP responseprivate static com.google.appengine.api.urlfetch.HTTPRequest toGAEHTTPRequest(HTTPRequest request)
request - the specified HTTP requestCopyright © 2010–2016 B3log. All rights reserved.