public class HttpResponse extends Object
Modifier and Type | Class and Description |
---|---|
static class |
HttpResponse.Builder
A builder class for
HttpResponse to create an immutable instance. |
Modifier and Type | Method and Description |
---|---|
static HttpResponse.Builder |
builder()
Creates a builder for
HttpResponse . |
InputStream |
getContent()
Returns the input stream containing the response content.
|
Map<String,String> |
getHeaders()
Returns the HTTP headers returned with this response.
|
InputStream |
getRawContent()
Get the raw content without considering Content-Encoding.
|
int |
getStatusCode()
Returns the HTTP status code (ex: 200, 404, etc) associated with this
response.
|
String |
getStatusText()
Returns the HTTP status text associated with this response.
|
public Map<String,String> getHeaders()
public InputStream getContent() throws IOException
IOException
- if an I/O error has occurredpublic InputStream getRawContent() throws IOException
IOException
- if an I/O error has occurredpublic String getStatusText()
public int getStatusCode()
public static HttpResponse.Builder builder()
HttpResponse
.Copyright © 2019. All rights reserved.