java.lang.Object | |
↳ | com.urbanairship.http.Request |
Http request wrapper.
Fields | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
protected String | body | ||||||||||
protected String | contentType | ||||||||||
protected String | password | ||||||||||
protected String | requestMethod | ||||||||||
protected final Map<String, String> | responseProperties | ||||||||||
protected URL | url | ||||||||||
protected String | user |
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Request(String requestMethod, URL url)
Request constructor.
|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Response |
execute()
Executes the request.
| ||||||||||
static String |
getUrbanAirshipUserAgent()
Gets the Urban Airship User Agent used for any Urban Airship requests.
| ||||||||||
Request |
setCompressRequestBody(boolean compressRequestBody)
Sets whether the request body is compressed with gzip.
| ||||||||||
Request |
setCredentials(String user, String password)
Sets the credentials.
| ||||||||||
Request |
setHeader(String key, String value)
Set additional request properties.
| ||||||||||
Request |
setIfModifiedSince(long timeMS)
Sets the if modified since value.
| ||||||||||
Request |
setRequestBody(String body, String contentType)
Sets the request body.
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
![]() |
Request constructor.
requestMethod | The string request method. |
---|---|
url | The request URL. |
Gets the Urban Airship User Agent used for any Urban Airship requests.
Sets whether the request body is compressed with gzip.
compressRequestBody | A boolean to compress the request body. |
---|
Sets the credentials.
user | The user ID. |
---|---|
password | The user token. |
Set additional request properties.
The credentials and content type will also be added. The credentials can be set with
setCredentials(String, String)
and the content type can be set with
setRequestBody(String, String)
.
key | The property. |
---|---|
value | The value of the property. |
Sets the if modified since value.
timeMS | The time in milliseconds. |
---|
Sets the request body.
body | The string body. |
---|---|
contentType | The string content type. |