Class HttpResponse<T>

    • Field Detail

      • __TYPE_ARG

        public static final io.vertx.lang.rx.TypeArg<HttpResponse> __TYPE_ARG
      • __typeArg_0

        public final io.vertx.lang.rx.TypeArg<T> __typeArg_0
    • Constructor Detail

      • HttpResponse

        public HttpResponse​(HttpResponse delegate)
      • HttpResponse

        public HttpResponse​(Object delegate,
                            io.vertx.lang.rx.TypeArg<T> typeArg_0)
    • Method Detail

      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object
      • statusCode

        public int statusCode()
        Specified by:
        statusCode in interface HttpResponseHead
        Returns:
        the status code of the response
      • getHeader

        public String getHeader​(String headerName)
        Return the first header value with the specified name
        Specified by:
        getHeader in interface HttpResponseHead
        Parameters:
        headerName - the header name
        Returns:
        the header value
      • trailers

        public MultiMap trailers()
        Returns:
        the trailers
      • getTrailer

        public String getTrailer​(String trailerName)
        Return the first trailer value with the specified name
        Parameters:
        trailerName - the trailer name
        Returns:
        the trailer value
      • body

        public T body()
        Returns:
        the response body in the format it was decoded.
      • bodyAsBuffer

        public Buffer bodyAsBuffer()
        Returns:
        the response body decoded as a , or null if a codec other than was used
      • followedRedirects

        public List<String> followedRedirects()
        Returns:
        the list of all followed redirects, including the final location.
      • bodyAsString

        public String bodyAsString()
        Returns:
        the response body decoded as a String, or null if a codec other than was used
      • bodyAsString

        public String bodyAsString​(String encoding)
        Parameters:
        encoding -
        Returns:
        the response body decoded as a String given a specific encoding, or null if a codec other than was used
      • bodyAsJsonObject

        public JsonObject bodyAsJsonObject()
        Returns:
        the response body decoded as , or null if a codec other than was used
      • bodyAsJsonArray

        public JsonArray bodyAsJsonArray()
        Returns:
        the response body decoded as a , or null if a codec other than was used
      • bodyAsJson

        public <R> R bodyAsJson​(Class<R> type)
        Parameters:
        type -
        Returns:
        the response body decoded as the specified type with the Jackson mapper, or null if a codec other than was used
      • getHeader

        public String getHeader​(CharSequence headerName)
        Return the first header value with the specified name
        Parameters:
        headerName - the header name
        Returns:
        the header value
      • newInstance

        public static <T> HttpResponse<T> newInstance​(HttpResponse arg,
                                                      io.vertx.lang.rx.TypeArg<T> __typeArg_T)