public class OAuth2ResponseImpl extends Object implements OAuth2Response
| Constructor and Description |
|---|
OAuth2ResponseImpl(int statusCode,
MultiMap headers,
Buffer body) |
| Modifier and Type | Method and Description |
|---|---|
Buffer |
body()
The HTTP response body as a buffer
|
String |
getHeader(String header)
Looks up a HTTP response header by name, in case where the response is a list of headers,
the first one is returned.
|
MultiMap |
headers()
The HTTP response headers from the HTTP layer.
|
boolean |
is(String contentType)
Helper to analize the response body.
|
JsonArray |
jsonArray()
The HTTP response body as a JsonArray
|
JsonObject |
jsonObject()
The HTTP response body as a JsonObject
|
int |
statusCode()
the returned status code from the HTTP layer.
|
public int statusCode()
OAuth2ResponsestatusCode in interface OAuth2Responsepublic MultiMap headers()
OAuth2Responseheaders in interface OAuth2Responsepublic String getHeader(String header)
OAuth2ResponsegetHeader in interface OAuth2Responseheader - of the header to look uppublic Buffer body()
OAuth2Responsebody in interface OAuth2Responsepublic JsonObject jsonObject()
OAuth2ResponsejsonObject in interface OAuth2Responsepublic JsonArray jsonArray()
OAuth2ResponsejsonArray in interface OAuth2Responsepublic boolean is(String contentType)
OAuth2Responseis in interface OAuth2ResponsecontentType - a content type to test, e.g.: application/jsonCopyright © 2020. All rights reserved.