Class Response

java.lang.Object
com.easypost.easyvcr.requestelements.HttpElement
com.easypost.easyvcr.requestelements.Response

public final class Response extends HttpElement
Represents an HTTP response tracked by EasyVCR.
  • Constructor Details

    • Response

      public Response()
  • Method Details

    • getBody

      public String getBody()
      Returns the body of the response.
      Returns:
      the body of the response
    • setBody

      public void setBody(String body)
      Sets the body of the response.
      Parameters:
      body - the body of the response
    • getHttpVersion

      public HttpVersion getHttpVersion()
      Returns the HttpVersion of the response.
      Returns:
      the HttpVersion of the response
    • setHttpVersion

      public void setHttpVersion(String version)
      Sets the HTTP version of the response from a String.
      Parameters:
      version - the HTTP version of the response as a String
    • getHeaders

      public Map<String,​List<String>> getHeaders()
      Returns the headers of the response.
      Returns:
      the headers of the response
    • setHeaders

      public void setHeaders(Map<String,​List<String>> headers)
      Sets the headers of the response.
      Parameters:
      headers - the headers of the response
    • addReplayHeaders

      public void addReplayHeaders()
      Add the EasyVCR headers to the response.
    • getStatus

      public Status getStatus()
      Returns the status of the response.
      Returns:
      the status of the response
    • setStatus

      public void setStatus(Status status)
      Sets the status of the response.
      Parameters:
      status - the status of the response
    • getUri

      public URI getUri()
      Returns the URI of the response.
      Returns:
      the URI of the response
    • setUri

      public void setUri(URI uri)
      Sets the URI of the response.
      Parameters:
      uri - the URI of the response
    • getUriString

      public String getUriString()
      Returns the URI of the response as a string.
      Returns:
      the URI of the response as a string
    • setUriString

      public void setUriString(String uriString)
      Sets the URI of the response from a string.
      Parameters:
      uriString - the URI of the response as a string