public static class

Response.Builder

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

Class Overview

Builds a Request Response.

Summary

Public Constructors
Builder(int status)
Creates a new response builder.
Public Methods
Response create()
Creates a response.
Response.Builder setLastModified(long lastModified)
Set the last modified time in milliseconds.
Response.Builder setResponseBody(String responseBody)
Set the response body.
Response.Builder setResponseHeaders(Map<StringList<String>> responseHeaders)
Set the response headers.
Response.Builder setResponseMessage(String responseMessage)
Set the response message.
[Expand]
Inherited Methods
From class java.lang.Object

Public Constructors

public Builder (int status)

Creates a new response builder.

Parameters
status The response status code.

Public Methods

public Response create ()

Creates a response.

Returns
  • The response.

public Response.Builder setLastModified (long lastModified)

Set the last modified time in milliseconds.

Parameters
lastModified The modified time in milliseconds.
Returns
  • The builder with the last modified time.

public Response.Builder setResponseBody (String responseBody)

Set the response body.

Parameters
responseBody The response body string.
Returns
  • The builder with the response body set.

public Response.Builder setResponseHeaders (Map<StringList<String>> responseHeaders)

Set the response headers.

Parameters
responseHeaders The response headers.
Returns
  • The builder with the response headers set.

public Response.Builder setResponseMessage (String responseMessage)

Set the response message.

Parameters
responseMessage The response message string.
Returns
  • The builder with the response message set.