public class HttpResponse extends Object
| Constructor and Description |
|---|
HttpResponse(Response response) |
| Modifier and Type | Method and Description |
|---|---|
ResponseBody |
body() |
byte[] |
bytes() |
InputStream |
byteStream() |
int |
code() |
Response |
getResponse() |
Handshake |
handshake() |
String |
header(String name) |
String |
header(String name,
String defaultValue) |
Headers |
headers() |
List<String> |
headers(String name) |
boolean |
isSuccessful() |
String |
message() |
ResponseBody |
peekBody(long byteCount) |
Protocol |
protocol() |
Request |
request() |
String |
string() |
String |
string(String charset) |
public HttpResponse(Response response)
public Request request()
public Protocol protocol()
public int code()
public boolean isSuccessful()
public String message()
public Handshake handshake()
public Headers headers()
public ResponseBody peekBody(long byteCount) throws IOException
IOExceptionpublic ResponseBody body()
public final String string() throws IOException
IOExceptionpublic final String string(String charset) throws IOException
IOExceptionpublic final byte[] bytes()
throws IOException
IOExceptionpublic final InputStream byteStream()
public Response getResponse()
Copyright © 2019. All rights reserved.