public class

Response

extends Object
java.lang.Object
   ↳ com.urbanairship.http.Response

Class Overview

Model object containing response information from a request.

Summary

Nested Classes
class Response.Builder Builds a Request Response. 
Constants
int HTTP_TOO_MANY_REQUESTS Status code for 429 - too many requests.
Public Methods
long getLastModifiedTime()
Gets the last modified header value in milliseconds.
String getResponseBody()
Returns the response body.
String getResponseHeader(String key)
Retrieves the first header value for a given key.
Map<StringList<String>> getResponseHeaders()
Returns the response headers.
int getStatus()
Returns the response status code.
String toString()
The Response as a string.
[Expand]
Inherited Methods
From class java.lang.Object

Constants

public static final int HTTP_TOO_MANY_REQUESTS

Status code for 429 - too many requests.

Constant Value: 429 (0x000001ad)

Public Methods

public long getLastModifiedTime ()

Gets the last modified header value in milliseconds.

Returns
  • the last modified header value in milliseconds, or 0 if does not exist.

public String getResponseBody ()

Returns the response body.

Returns
  • The response body as a string.

public String getResponseHeader (String key)

Retrieves the first header value for a given key.

Parameters
key The key.
Returns
  • The first header value.

public Map<StringList<String>> getResponseHeaders ()

Returns the response headers.

Returns
  • The response headers as a map.

public int getStatus ()

Returns the response status code.

Returns
  • The response status code as an int.

public String toString ()

The Response as a string.

Returns
  • The response as a string.