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, java.io.InputStream rawBody, java.lang.String body)
    Initialization constructor.
  • Method Summary

    Modifier and Type Method Description
    java.lang.String getBody()
    String body of the http response.
    java.lang.String toString()
    Converts this HttpStringResponse into string format.

    Methods inherited from class com.bandwidth.http.response.HttpResponse

    getHeaders, getRawBody, getRawBodyString, getStatusCode

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • Constructor Details

    • HttpStringResponse

      public HttpStringResponse​(int code, Headers headers, java.io.InputStream rawBody, java.lang.String body)
      Initialization constructor.
      Parameters:
      code - The HTTP status code
      headers - The HTTP headers read from response
      rawBody - The raw data returned in the HTTP response
      body - String response body
  • Method Details

    • getBody

      public java.lang.String getBody()
      String body of the http response.
      Returns:
      String response body
    • toString

      public java.lang.String toString()
      Converts this HttpStringResponse into string format.
      Overrides:
      toString in class HttpResponse
      Returns:
      String representation of this class