public class HttpResponse extends Object
Modifier | Constructor and Description |
---|---|
protected |
HttpResponse() |
|
HttpResponse(int status,
byte[] body,
Map<String,List<String>> headerFields,
byte[] errorReason)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
byte[] |
getBody()
Getter for the response body.
|
byte[] |
getErrorReason()
Getter for the error reason.
|
String |
getHeaderField(String field)
Getter for a header field.
|
Map<String,String> |
getHeaderFields()
Getter for the header fields.
|
int |
getStatus()
Getter for the HTTPS status code.
|
boolean |
isFieldAvailable(String field) |
public HttpResponse(int status, byte[] body, Map<String,List<String>> headerFields, byte[] errorReason)
status
- The HTTPS status code.body
- The response body.headerFields
- The map of header field names and the values associated with the field name.errorReason
- The error reason.protected HttpResponse()
public int getStatus()
public byte[] getBody()
public String getHeaderField(String field)
field
- the header field name.IllegalArgumentException
- if no value exists for the given field
name.public boolean isFieldAvailable(String field)
public Map<String,String> getHeaderFields()
public byte[] getErrorReason()
Copyright © 2022. All rights reserved.