Package io.vertx.ext.web.client
Interface HttpResponse<T>
- 
- All Superinterfaces:
- HttpResponseHead
 
 public interface HttpResponse<T> extends HttpResponseHead An HTTP response.The usual HTTP response attributes are available: - HttpResponseHead.statusCode()the HTTP status code
- HttpResponseHead.statusMessage()the HTTP status message
- HttpResponseHead.headers()the HTTP headers
- HttpResponseHead.version()the HTTP version
 The body of the response is returned by body()decoded as the format specified by theBodyCodecthat built the response.Keep in mind that using this HttpResponseimpose to fully buffer the response body and should be used for payload that can fit in memory.- Author:
- Julien Viet
 
- 
- 
Method SummaryAll Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description Tbody()BufferbodyAsBuffer()default <R> RbodyAsJson(Class<R> type)JsonArraybodyAsJsonArray()default JsonObjectbodyAsJsonObject()default StringbodyAsString()default StringbodyAsString(String encoding)List<String>followedRedirects()StringgetTrailer(String trailerName)Return the first trailer value with the specified nameMultiMaptrailers()- 
Methods inherited from interface io.vertx.core.http.HttpResponseHeadcookies, getHeader, getHeader, headers, statusCode, statusMessage, version
 
- 
 
- 
- 
- 
Method Detail- 
trailersMultiMap trailers() - Returns:
- the trailers
 
 - 
getTrailerString getTrailer(String trailerName) Return the first trailer value with the specified name- Parameters:
- trailerName- the trailer name
- Returns:
- the trailer value
 
 - 
bodyT body() - Returns:
- the response body in the format it was decoded.
 
 - 
bodyAsBufferBuffer bodyAsBuffer() - Returns:
- the response body decoded as a Buffer, ornullif a codec other thanBodyCodec.buffer()was used
 
 - 
followedRedirectsList<String> followedRedirects() - Returns:
- the list of all followed redirects, including the final location.
 
 - 
bodyAsStringdefault String bodyAsString() - Returns:
- the response body decoded as a String, ornullif a codec other thanBodyCodec.buffer()was used
 
 - 
bodyAsStringdefault String bodyAsString(String encoding) - Returns:
- the response body decoded as a Stringgiven a specificencoding, ornullif a codec other thanBodyCodec.buffer()was used
 
 - 
bodyAsJsonObjectdefault JsonObject bodyAsJsonObject() - Returns:
- the response body decoded as JsonObject, ornullif a codec other thanBodyCodec.buffer()was used
 
 - 
bodyAsJsonArrayJsonArray bodyAsJsonArray() - Returns:
- the response body decoded as a JsonArray, ornullif a codec other thanBodyCodec.buffer()was used
 
 - 
bodyAsJsondefault <R> R bodyAsJson(Class<R> type) - Returns:
- the response body decoded as the specified typewith the Jackson mapper, ornullif a codec other thanBodyCodec.buffer()was used
 
 
- 
 
-