|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.google.appengine.api.urlfetch.HTTPRequest
public class HTTPRequest
HTTPRequest
encapsulates a single HTTP request that is made
via the URLFetchService
.
Constructor Summary | |
---|---|
HTTPRequest(java.net.URL url)
Creates a HTTPRequest that represents a GET request to
the specified URL. |
|
HTTPRequest(java.net.URL url,
HTTPMethod method)
Creates a HTTPRequest that represents an HTTP request to
the speceified URL with the specified HTTP method (e.g. |
|
HTTPRequest(java.net.URL url,
HTTPMethod method,
FetchOptions fetchOptions)
Creates a HTTPRequest that represents an HTTP request to
the speceified URL with the specified HTTP method (e.g. |
Method Summary | |
---|---|
void |
addHeader(HTTPHeader header)
Adds header to this request. |
FetchOptions |
getFetchOptions()
Get the fetch options for this request. |
java.util.List<HTTPHeader> |
getHeaders()
Returns an immutable List of HTTPHeader objects
that have been added to this request. |
HTTPMethod |
getMethod()
Gets the HTTP method for this request (e.g. |
byte[] |
getPayload()
Gets the payload (e.g. |
java.net.URL |
getURL()
Gets the URL for this request. |
void |
setHeader(HTTPHeader header)
Sets an HTTPHeader for this request. |
void |
setPayload(byte[] payload)
Sets the payload for this request. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public HTTPRequest(java.net.URL url)
HTTPRequest
that represents a GET request to
the specified URL.
public HTTPRequest(java.net.URL url, HTTPMethod method)
HTTPRequest
that represents an HTTP request to
the speceified URL with the specified HTTP method (e.g. GET,
POST, etc.).
public HTTPRequest(java.net.URL url, HTTPMethod method, FetchOptions fetchOptions)
HTTPRequest
that represents an HTTP request to
the speceified URL with the specified HTTP method (e.g. GET,
POST, etc.) and the specified FetchOptions
.
Method Detail |
---|
public HTTPMethod getMethod()
public java.net.URL getURL()
public byte[] getPayload()
public void setPayload(byte[] payload)
public void addHeader(HTTPHeader header)
header
to this request. If an HTTPHeader
with
the same name
already exists for this request, it's values
are merged with header
.
header
- a not null
HTTPHeader
public void setHeader(HTTPHeader header)
HTTPHeader
for this request. If an
HTTPHeader
with the same name
already exists, its value is replaced.
public java.util.List<HTTPHeader> getHeaders()
List
of HTTPHeader
objects
that have been added to this request.
public FetchOptions getFetchOptions()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |