Class Response<T>


  • public class Response<T>
    extends java.lang.Object
    A response from the HttpClient.
    • Constructor Summary

      Constructors 
      Constructor Description
      Response​(int statusCode, T body, java.lang.String bodyRaw, java.util.Map<java.lang.String,​java.util.List<java.lang.String>> headerFields)
      Construct a response.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      T getBody()
      Get the body of the response.
      java.lang.String getBodyRaw()
      Get the raw body of the response (can be useful if parsing fails).
      java.util.Map<java.lang.String,​java.util.List<java.lang.String>> getHeaderFields()
      Get the response headers.
      int getStatusCode()
      Get the response code.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • Response

        public Response​(int statusCode,
                        T body,
                        java.lang.String bodyRaw,
                        java.util.Map<java.lang.String,​java.util.List<java.lang.String>> headerFields)
        Construct a response.
        Parameters:
        statusCode - The response code.
        body - The body of the response.
        bodyRaw - The unparsed body of the response.
        headerFields - Header fields in the response.
    • Method Detail

      • getStatusCode

        public int getStatusCode()
        Get the response code.
      • getBody

        public T getBody()
        Get the body of the response.
      • getBodyRaw

        public java.lang.String getBodyRaw()
        Get the raw body of the response (can be useful if parsing fails).
      • getHeaderFields

        public java.util.Map<java.lang.String,​java.util.List<java.lang.String>> getHeaderFields()
        Get the response headers.