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.Closeable
An immutable response to an http invocation which only returns string content.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interface
Response.Body
static class
Response.Builder
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description Response.Body
body()
if present, the response had a bodystatic Response.Builder
builder()
void
close()
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.String
reason()
Nullable and not set when using http/2 See https://github.com/http2/http2-spec/issues/202Request
request()
the request that generated this responseint
status()
status code.Response.Builder
toBuilder()
java.lang.String
toString()
-
-
-
Method Detail
-
toBuilder
public Response.Builder toBuilder()
-
builder
public static Response.Builder builder()
-
status
public int status()
status code. ex200
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 classjava.lang.Object
-
close
public void close()
- Specified by:
close
in interfacejava.lang.AutoCloseable
- Specified by:
close
in interfacejava.io.Closeable
-
-