Package feign
Class Response
- java.lang.Object
-
- feign.Response
-
- All Implemented Interfaces:
java.io.Closeable,java.lang.AutoCloseable
public final class Response extends java.lang.Object implements java.io.CloseableAn immutable response to an http invocation which only returns string content.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interfaceResponse.Bodystatic classResponse.Builder
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description Response.Bodybody()if present, the response had a bodystatic Response.Builderbuilder()voidclose()java.util.Map<java.lang.String,java.util.Collection<java.lang.String>>headers()Returns a case-insensitive mapping of header names to their values.java.lang.Stringreason()Nullable and not set when using http/2 See https://github.com/http2/http2-spec/issues/202Requestrequest()the request that generated this responseintstatus()status code.Response.BuildertoBuilder()java.lang.StringtoString()
-
-
-
Method Detail
-
toBuilder
public Response.Builder toBuilder()
-
builder
public static Response.Builder builder()
-
status
public int status()
status code. ex200See 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:
toStringin classjava.lang.Object
-
close
public void close()
- Specified by:
closein interfacejava.lang.AutoCloseable- Specified by:
closein interfacejava.io.Closeable
-
-