Class HttpResponseImpl

java.lang.Object
org.camunda.connect.impl.AbstractConnectorResponse
org.camunda.connect.impl.AbstractCloseableConnectorResponse
org.camunda.connect.httpclient.impl.HttpResponseImpl
All Implemented Interfaces:
HttpResponse, org.camunda.connect.spi.CloseableConnectorResponse, org.camunda.connect.spi.ConnectorResponse

public class HttpResponseImpl extends org.camunda.connect.impl.AbstractCloseableConnectorResponse implements HttpResponse
  • Field Details

    • httpResponse

      protected org.apache.http.client.methods.CloseableHttpResponse httpResponse
  • Constructor Details

    • HttpResponseImpl

      public HttpResponseImpl(org.apache.http.client.methods.CloseableHttpResponse httpResponse)
  • Method Details

    • getStatusCode

      public Integer getStatusCode()
      Specified by:
      getStatusCode in interface HttpResponse
      Returns:
      the HTTP status code of the response
    • getResponse

      public String getResponse()
      Specified by:
      getResponse in interface HttpResponse
      Returns:
      the response body or null if non exists
    • getHeaders

      public Map<String,String> getHeaders()
      Specified by:
      getHeaders in interface HttpResponse
      Returns:
      the response headers
    • getHeader

      public String getHeader(String field)
      Specified by:
      getHeader in interface HttpResponse
      Returns:
      return the response header value for the given field or null if not set
    • collectResponseParameters

      protected void collectResponseParameters(Map<String,Object> responseParameters)
      Specified by:
      collectResponseParameters in class org.camunda.connect.impl.AbstractConnectorResponse
    • collectResponseHeaders

      protected void collectResponseHeaders()
    • getClosable

      protected Closeable getClosable()
      Specified by:
      getClosable in class org.camunda.connect.impl.AbstractCloseableConnectorResponse