Interface HttpResponse<T>

    • Method Detail

      • trailers

        MultiMap trailers()
        Returns:
        the trailers
      • getTrailer

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

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

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

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

        default String bodyAsString​(String encoding)
        Returns:
        the response body decoded as a String given a specific encoding, or null if a codec other than BodyCodec.buffer() was used
      • bodyAsJson

        default <R> R bodyAsJson​(Class<R> type)
        Returns:
        the response body decoded as the specified type with the Jackson mapper, or null if a codec other than BodyCodec.buffer() was used