interface OAuth2Response
A response from a fetch request. This class represents a secure response from a Oauth2 fetch call. A fetch is a simplified HTTP response from a protected resource.
Author
Paulo Lopes
abstract fun body(): Buffer
The HTTP response body as a buffer |
|
abstract fun getHeader(name: String): String
Looks up a HTTP response header by name, in case where the response is a list of headers, the first one is returned. |
|
abstract fun headers(): MultiMap
The HTTP response headers from the HTTP layer. |
|
abstract fun is(contentType: String): Boolean
Helper to analize the response body. The test is performed against the header Content-Type, the content of the body is not analyzed. |
|
abstract fun jsonArray(): JsonArray
The HTTP response body as a JsonArray |
|
abstract fun jsonObject(): JsonObject
The HTTP response body as a JsonObject |
|
abstract fun statusCode(): Int
the returned status code from the HTTP layer. |