Class HttpResponse<T>
java.lang.Object
io.vertx.reactivex.ext.web.client.HttpResponse<T>
- All Implemented Interfaces:
io.vertx.lang.rx.RxDelegate, HttpResponseHead
public class HttpResponse<T>
extends Object
implements io.vertx.lang.rx.RxDelegate, HttpResponseHead
An HTTP response.
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.
NOTE: This class has been automatically generated from the original non RX-ified interface using Vert.x codegen.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final io.vertx.lang.rx.TypeArg<HttpResponse> final io.vertx.lang.rx.TypeArg<T> -
Constructor Summary
ConstructorsConstructorDescriptionHttpResponse(HttpResponse delegate) HttpResponse(Object delegate, io.vertx.lang.rx.TypeArg<T> typeArg_0) -
Method Summary
Modifier and TypeMethodDescriptionbody()<R> RbodyAsJson(Class<R> type) bodyAsString(String encoding) cookies()booleangetHeader(CharSequence headerName) Return the first header value with the specified nameReturn the first header value with the specified namegetTrailer(String trailerName) Return the first trailer value with the specified nameinthashCode()headers()static <T> HttpResponse<T> newInstance(HttpResponse arg) static <T> HttpResponse<T> newInstance(HttpResponse arg, io.vertx.lang.rx.TypeArg<T> __typeArg_T) inttoString()trailers()version()
-
Field Details
-
__TYPE_ARG
-
__typeArg_0
-
-
Constructor Details
-
HttpResponse
-
HttpResponse
-
-
Method Details
-
toString
-
equals
-
hashCode
-
getDelegate
- Specified by:
getDelegatein interfaceHttpResponseHead- Specified by:
getDelegatein interfaceio.vertx.lang.rx.RxDelegate
-
version
- Specified by:
versionin interfaceHttpResponseHead- Returns:
- the version of the response
-
statusCode
public int statusCode()- Specified by:
statusCodein interfaceHttpResponseHead- Returns:
- the status code of the response
-
statusMessage
- Specified by:
statusMessagein interfaceHttpResponseHead- Returns:
- the status message of the response
-
headers
- Specified by:
headersin interfaceHttpResponseHead- Returns:
- the headers
-
getHeader
Return the first header value with the specified name- Specified by:
getHeaderin interfaceHttpResponseHead- Parameters:
headerName- the header name- Returns:
- the header value
-
cookies
- Specified by:
cookiesin interfaceHttpResponseHead- Returns:
- the Set-Cookie headers (including trailers)
-
trailers
- Returns:
- the trailers
-
getTrailer
-
body
- Returns:
- the response body in the format it was decoded.
-
bodyAsBuffer
- Returns:
- the response body decoded as a , or
nullif a codec other than was used
-
followedRedirects
-
bodyAsString
- Returns:
- the response body decoded as a
String, ornullif a codec other than was used
-
bodyAsString
-
bodyAsJsonObject
- Returns:
- the response body decoded as , or
nullif a codec other than was used
-
bodyAsJsonArray
- Returns:
- the response body decoded as a , or
nullif a codec other than was used
-
bodyAsJson
- Parameters:
type-- Returns:
- the response body decoded as the specified
typewith the Jackson mapper, ornullif a codec other than was used
-
getHeader
Return the first header value with the specified name- Parameters:
headerName- the header name- Returns:
- the header value
-
newInstance
-
newInstance
public static <T> HttpResponse<T> newInstance(HttpResponse arg, io.vertx.lang.rx.TypeArg<T> __typeArg_T)
-