public interface HttpResponse
extends java.io.Closeable
Closeable
. Closing it simply closes its response streams (if any).Modifier and Type | Interface and Description |
---|---|
static class |
HttpResponse.Builder |
Modifier and Type | Method and Description |
---|---|
int |
code()
The HTTP status code.
|
java.io.InputStream |
getContent()
The response body, or null if no body.
|
long |
getContentLength()
The length of the content, if known.
|
<any> |
headers() |
java.lang.String |
reasonPhrase()
The HTTP reason phrase.
|
int code()
@Nullable java.lang.String reasonPhrase()
<any> headers()
long getContentLength()
Long.MAX_VALUE
,
a negative number is returned.java.io.InputStream getContent()