public class HttpResponse<T> extends Object implements HttpResponseHead
The usual HTTP response attributes are available:
HttpResponseHead.statusCode() the HTTP status codeHttpResponseHead.statusMessage() the HTTP status messageHttpResponseHead.headers() the HTTP headersHttpResponseHead.version() the HTTP version
The body of the response is returned by body() decoded as the format specified by the BodyCodec that
built the response.
Keep in mind that using this HttpResponse impose to fully buffer the response body and should be used for payload
that can fit in memory.
original non RX-ified interface using Vert.x codegen.| Modifier and Type | Field and Description |
|---|---|
static io.vertx.lang.rx.TypeArg<HttpResponse> |
__TYPE_ARG |
io.vertx.lang.rx.TypeArg<T> |
__typeArg_0 |
| Constructor and Description |
|---|
HttpResponse(HttpResponse delegate) |
HttpResponse(Object delegate,
io.vertx.lang.rx.TypeArg<T> typeArg_0) |
| Modifier and Type | Method and Description |
|---|---|
T |
body() |
Buffer |
bodyAsBuffer() |
<R> R |
bodyAsJson(Class<R> type) |
JsonArray |
bodyAsJsonArray() |
JsonObject |
bodyAsJsonObject() |
String |
bodyAsString() |
String |
bodyAsString(String encoding) |
List<String> |
cookies() |
boolean |
equals(Object o) |
List<String> |
followedRedirects() |
HttpResponse |
getDelegate() |
String |
getHeader(CharSequence headerName)
Return the first header value with the specified name
|
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
|
int |
hashCode() |
MultiMap |
headers() |
static <T> HttpResponse<T> |
newInstance(HttpResponse arg) |
static <T> HttpResponse<T> |
newInstance(HttpResponse arg,
io.vertx.lang.rx.TypeArg<T> __typeArg_T) |
int |
statusCode() |
String |
statusMessage() |
String |
toString() |
MultiMap |
trailers() |
HttpVersion |
version() |
clone, finalize, getClass, notify, notifyAll, wait, wait, waitnewInstancepublic static final io.vertx.lang.rx.TypeArg<HttpResponse> __TYPE_ARG
public final io.vertx.lang.rx.TypeArg<T> __typeArg_0
public HttpResponse(HttpResponse delegate)
public HttpResponse getDelegate()
getDelegate in interface HttpResponseHeadpublic HttpVersion version()
version in interface HttpResponseHeadpublic int statusCode()
statusCode in interface HttpResponseHeadpublic String statusMessage()
statusMessage in interface HttpResponseHeadpublic MultiMap headers()
headers in interface HttpResponseHeadpublic String getHeader(String headerName)
getHeader in interface HttpResponseHeadheaderName - the header namepublic List<String> cookies()
cookies in interface HttpResponseHeadpublic MultiMap trailers()
public String getTrailer(String trailerName)
trailerName - the trailer namepublic T body()
public Buffer bodyAsBuffer()
null if a codec other than was usedpublic List<String> followedRedirects()
public String bodyAsString()
String, or null if a codec other than was usedpublic String bodyAsString(String encoding)
encoding - String given a specific encoding, or null if a codec other than was usedpublic JsonObject bodyAsJsonObject()
null if a codec other than was usedpublic JsonArray bodyAsJsonArray()
null if a codec other than was usedpublic <R> R bodyAsJson(Class<R> type)
type - type with the Jackson mapper, or null if a codec other than was usedpublic String getHeader(CharSequence headerName)
headerName - the header namepublic static <T> HttpResponse<T> newInstance(HttpResponse arg)
public static <T> HttpResponse<T> newInstance(HttpResponse arg, io.vertx.lang.rx.TypeArg<T> __typeArg_T)
Copyright © 2024 Eclipse. All rights reserved.