Class HttpResponse

java.lang.Object
org.nuxeo.http.test.HttpResponse
Direct Known Subclasses:
CloseableHttpResponse

public class HttpResponse extends Object
Since:
2023.13
  • Field Details

    • response

      protected final org.apache.http.client.methods.CloseableHttpResponse response
    • responseStream

      protected CloningInputStream responseStream
  • Constructor Details

    • HttpResponse

      protected HttpResponse(org.apache.http.client.methods.CloseableHttpResponse response)
  • Method Details

    • getStatus

      public int getStatus()
      Returns:
      the HTTP status code
    • getLocation

      public URI getLocation()
      Returns:
      the Location header value, if any
    • getType

      public String getType()
      Returns:
      the Content-Type header value, if any
    • getOptFirstHeader

      public Optional<String> getOptFirstHeader(String headerName)
      Returns:
      the header value
    • getFirstHeader

      public String getFirstHeader(String headerName)
      Returns:
      the header value, if any
    • getEntityInputStream

      public InputStream getEntityInputStream()
      Returns:
      the entity body as InputStream
    • getEntityString

      public String getEntityString()
      Returns:
      the entity body as String
    • getResponseStream

      protected Optional<CloningInputStream> getResponseStream() throws IOException
      Throws:
      IOException