Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.google.appengine.api.urlfetch
Interface URLFetchService

    public interface URLFetchService

The `URLFetchService` provides a way for user code to execute HTTP requests to external URLs.

Chunked and hanging requests are not supported, and all content will be returned in a single block.

Method Summary
`HTTPResponse` | `fetch(HTTPRequest request)` Execute the specified request and return its response.
`HTTPResponse` | `fetch(java.net.URL url)` Convenience method for retrieving a specific URL via a HTTP GET request with no custom headers and default values for all `FetchOptions` attributes.

Method Detail

### fetch

    HTTPResponse fetch(java.net.URL url)
                       throws java.io.IOException

  Convenience method for retrieving a specific URL via a HTTP GET request with no custom headers and default values for all `FetchOptions` attributes. For more complex requests, use `fetch(HTTPRequest)`.

  Parameters:
    `url` - The url to fetch.
  Returns:
    The result of the fetch.
  Throws:
    `java.net.MalformedURLException` - If the provided URL is malformed.
    `java.io.IOException` - If the remote service could not be contacted or the URL could not be fetched.
    `ResponseTooLargeException` - If the response is too large.

### fetch

    HTTPResponse fetch(HTTPRequest request)
                       throws java.io.IOException

  Execute the specified request and return its response.

  Parameters:
    `request` - The http request.
  Returns:
    The result of the fetch.
  Throws:
    `java.lang.IllegalArgumentException` - If {@code request.getMethod) is not supported by the URLFetchService.
    `java.net.MalformedURLException` - If the provided URL is malformed.
    `java.io.IOException` - If the remote service could not be contacted or the URL could not be fetched.
    `ResponseTooLargeException` - If response truncation has been disabled via the `FetchOptions` object on `request` and the response is too large. Some responses are too large to even retrieve from the remote server, and in these cases the exception is thrown even if response truncation is enabled.

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD