Class Response

java.lang.Object
io.github.parthappm.http.client.Response

public class Response extends Object
The Response class contains all the data related to HTTP response returned by the server
  • Method Details

    • getVersion

      public String getVersion()
      Getter method to get the HTTP version specified by the server in the response.
      Returns:
      The HTTP version specified by the server in the response
    • getStatusCode

      public int getStatusCode()
      Getter method to get the response status code.
      Returns:
      The response status code
    • getStatusText

      public String getStatusText()
      Getter method to get the response status text.
      Returns:
      The response status text
    • getHeaders

      public Map<String,String> getHeaders()
      Getter method to get the response headers.
      Returns:
      The response headers
    • getBody

      public byte[] getBody()
      Getter method to get the response body as bytes array.
      Returns:
      The response body as byte array
    • getText

      public String getText()
      Getter method to get the response body as String representation decoded by UTF 8 standard.
      Returns:
      The response body as String representation decoded by UTF 8 standard