# HTTPResponse
Date: 2012-02-24

## com.google.appengine.api.urlfetch
Class HTTPResponse

    java.lang.Object
      com.google.appengine.api.urlfetch.HTTPResponse

All Implemented Interfaces:
  java.io.Serializable

    public class HTTPResponse

extends java.lang.Object
implements java.io.Serializable

`HTTPResponse` encapsulates the results of a `HTTPRequest` made via the `URLFetchService`.

See Also:
  Serialized Form

Method Summary
`byte[]` `getContent()` Returns the content of the request, or null if there is no content present (e.g.
`java.net.URL` `getFinalUrl()` Returns the final URL the content came from if redirects were followed automatically in the request, if different than the input URL; otherwise this will be null.
`java.util.List<HTTPHeader>` `getHeaders()` Returns a `List` of HTTP response headers that were returned by the remote server.
`int` `getResponseCode()` Returns the HTTP response code from the request (e.g.

Methods inherited from class java.lang.Object
`equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Method Detail

### getResponseCode

    public int getResponseCode()

  Returns the HTTP response code from the request (e.g. 200, 500, etc.).

### getContent

    public byte[] getContent()

  Returns the content of the request, or null if there is no content present (e.g. in a HEAD request).

### getFinalUrl

    public java.net.URL getFinalUrl()

  Returns the final URL the content came from if redirects were followed automatically in the request, if different than the input URL; otherwise this will be null.

### getHeaders

    public java.util.List<HTTPHeader> getHeaders()

  Returns a `List` of HTTP response headers that were returned by the remote server. Multi-valued headers are represented as a single `HTTPHeader` with comma-separated values.