public class HttpResponseImpl<T> extends Object implements HttpResponse<T>
| Constructor and Description |
|---|
HttpResponseImpl(HttpVersion version,
int statusCode,
String statusMessage,
MultiMap headers,
MultiMap trailers,
List<String> cookies,
T body,
List<String> redirects) |
| Modifier and Type | Method and Description |
|---|---|
T |
body() |
Buffer |
bodyAsBuffer() |
JsonArray |
bodyAsJsonArray() |
List<String> |
cookies() |
List<String> |
followedRedirects() |
String |
getHeader(String headerName)
Return the first header value with the specified name
|
String |
getTrailer(String trailerName)
Return the first trailer value with the specified name
|
MultiMap |
headers() |
int |
statusCode() |
String |
statusMessage() |
MultiMap |
trailers() |
HttpVersion |
version() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitbodyAsJson, bodyAsJsonObject, bodyAsString, bodyAsStringpublic HttpVersion version()
version in interface HttpResponse<T>public int statusCode()
statusCode in interface HttpResponse<T>public String statusMessage()
statusMessage in interface HttpResponse<T>public String getHeader(String headerName)
HttpResponsegetHeader in interface HttpResponse<T>headerName - the header namepublic MultiMap trailers()
trailers in interface HttpResponse<T>public String getTrailer(String trailerName)
HttpResponsegetTrailer in interface HttpResponse<T>trailerName - the trailer namepublic List<String> cookies()
cookies in interface HttpResponse<T>public MultiMap headers()
headers in interface HttpResponse<T>public T body()
body in interface HttpResponse<T>public Buffer bodyAsBuffer()
bodyAsBuffer in interface HttpResponse<T>Buffer, or null if a codec other than BodyCodec.buffer() was usedpublic List<String> followedRedirects()
followedRedirects in interface HttpResponse<T>public JsonArray bodyAsJsonArray()
bodyAsJsonArray in interface HttpResponse<T>JsonArray, or null if a codec other than BodyCodec.buffer() was usedCopyright © 2020. All rights reserved.