Package com.bandwidth.http.response
Class HttpStringResponse
- java.lang.Object
-
- com.bandwidth.http.response.HttpResponse
-
- com.bandwidth.http.response.HttpStringResponse
-
public class HttpStringResponse extends HttpResponse
Class to hold response body as string.
-
-
Constructor Summary
Constructors Constructor Description HttpStringResponse(int code, Headers headers, InputStream rawBody, String body)
Initialization constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getBody()
String body of the http response.String
toString()
Converts this HttpStringResponse into string format.-
Methods inherited from class com.bandwidth.http.response.HttpResponse
getHeaders, getRawBody, getRawBodyString, getStatusCode
-
-
-
-
Constructor Detail
-
HttpStringResponse
public HttpStringResponse(int code, Headers headers, InputStream rawBody, String body)
Initialization constructor.- Parameters:
code
- The HTTP status codeheaders
- The HTTP headers read from responserawBody
- The raw data returned in the HTTP responsebody
- String response body
-
-
Method Detail
-
getBody
public String getBody()
String body of the http response.- Returns:
- String response body
-
toString
public String toString()
Converts this HttpStringResponse into string format.- Overrides:
toString
in classHttpResponse
- Returns:
- String representation of this class
-
-