RestResponse

open class RestResponse

RestResponse: Class to represent any REST response.

Constructors

Link copied to clipboard
constructor(response: Response)
Constructor

Functions

Link copied to clipboard
open fun asBytes(): Array<Byte>
Link copied to clipboard
Streams the response content.
Link copied to clipboard
JSONArray is built the first time the method is called.
Link copied to clipboard
JSONObject is built the first time the method is called.
Link copied to clipboard
open fun asString(): String
String is built the first time the method is called.
Link copied to clipboard
open fun consume()
Fully consume response entity content and closes content stream Must be called before returning control to the UI thread
Link copied to clipboard
open fun consumeQuietly()
Fully consume a response and swallow any exceptions thrown during the process.
Link copied to clipboard
Returns all headers associated with this response.
Link copied to clipboard
Return content type
Link copied to clipboard
open fun getRawResponse(): Response
Method to get the "raw" response (i.e.
Link copied to clipboard
open fun getStatusCode(): Int
Link copied to clipboard
open fun isSuccess(): Boolean
open fun isSuccess(statusCode: Int): Boolean
Link copied to clipboard
open fun toString(): String