Package feign

Class Response

  • All Implemented Interfaces:
    java.io.Closeable, java.lang.AutoCloseable

    public final class Response
    extends java.lang.Object
    implements java.io.Closeable
    An immutable response to an http invocation which only returns string content.
    • Method Detail

      • status

        public int status()
        status code. ex 200 See rfc2616
      • reason

        public java.lang.String reason()
        Nullable and not set when using http/2 See https://github.com/http2/http2-spec/issues/202
      • headers

        public java.util.Map<java.lang.String,​java.util.Collection<java.lang.String>> headers()
        Returns a case-insensitive mapping of header names to their values.
      • body

        public Response.Body body()
        if present, the response had a body
      • request

        public Request request()
        the request that generated this response
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • close

        public void close()
        Specified by:
        close in interface java.lang.AutoCloseable
        Specified by:
        close in interface java.io.Closeable