public class HttpResponse extends Object implements io.apimatic.coreinterfaces.http.response.Response
| Constructor and Description |
|---|
HttpResponse(int code,
Headers headers,
InputStream rawBody)
Initialization constructor.
|
HttpResponse(int code,
Headers headers,
InputStream rawBody,
String body)
Initialization constructor.
|
| Modifier and Type | Method and Description |
|---|---|
String |
getBody()
String body of the http response.
|
Headers |
getHeaders()
Headers of the http response.
|
InputStream |
getRawBody()
Raw body of the http response.
|
String |
getRawBodyString()
String representation for raw body of the http response.
|
int |
getStatusCode()
HTTP Status code of the http response.
|
String |
toString()
Converts this HttpResponse into string format.
|
public HttpResponse(int code,
Headers headers,
InputStream rawBody)
code - The HTTP status codeheaders - The HTTP headers read from responserawBody - The raw data returned in the HTTP responsepublic HttpResponse(int code,
Headers headers,
InputStream rawBody,
String body)
code - The HTTP status codeheaders - The HTTP headers read from responserawBody - The raw data returned in the HTTP responsebody - String response bodypublic int getStatusCode()
getStatusCode in interface io.apimatic.coreinterfaces.http.response.Responsepublic Headers getHeaders()
getHeaders in interface io.apimatic.coreinterfaces.http.response.Responsepublic InputStream getRawBody()
getRawBody in interface io.apimatic.coreinterfaces.http.response.Responsepublic String getRawBodyString()
getRawBodyString in interface io.apimatic.coreinterfaces.http.response.Responsepublic String getBody()
getBody in interface io.apimatic.coreinterfaces.http.response.ResponseCopyright © 2023. All rights reserved.