Class ApacheHttpRequest

java.lang.Object
ca.uhn.fhir.rest.client.api.BaseHttpRequest
ca.uhn.fhir.rest.client.apache.ApacheHttpRequest
All Implemented Interfaces:
ca.uhn.fhir.rest.client.api.IHttpRequest

public class ApacheHttpRequest extends ca.uhn.fhir.rest.client.api.BaseHttpRequest implements ca.uhn.fhir.rest.client.api.IHttpRequest
A Http Request based on Apache. This is an adapter around the class HttpRequestBase
Author:
Peter Van Houte | peter.vanhoute@agfa.com | Agfa Healthcare
  • Constructor Details

    • ApacheHttpRequest

      public ApacheHttpRequest(org.apache.http.client.HttpClient theClient, org.apache.http.client.methods.HttpRequestBase theApacheRequest)
  • Method Details

    • addHeader

      public void addHeader(String theName, String theValue)
      Specified by:
      addHeader in interface ca.uhn.fhir.rest.client.api.IHttpRequest
    • execute

      public ca.uhn.fhir.rest.client.api.IHttpResponse execute() throws IOException
      Specified by:
      execute in interface ca.uhn.fhir.rest.client.api.IHttpRequest
      Throws:
      IOException
    • getAllHeaders

      Specified by:
      getAllHeaders in interface ca.uhn.fhir.rest.client.api.IHttpRequest
    • getApacheRequest

      public org.apache.http.client.methods.HttpRequestBase getApacheRequest()
      Get the ApacheRequest
      Returns:
      the ApacheRequest
    • getHttpVerbName

      Specified by:
      getHttpVerbName in interface ca.uhn.fhir.rest.client.api.IHttpRequest
    • removeHeaders

      public void removeHeaders(String theHeaderName)
      Specified by:
      removeHeaders in interface ca.uhn.fhir.rest.client.api.IHttpRequest
    • getRequestBodyFromStream

      Specified by:
      getRequestBodyFromStream in interface ca.uhn.fhir.rest.client.api.IHttpRequest
      Throws:
      IOException
    • getUri

      public String getUri()
      Specified by:
      getUri in interface ca.uhn.fhir.rest.client.api.IHttpRequest
    • setUri

      public void setUri(String theUrl)
      Specified by:
      setUri in interface ca.uhn.fhir.rest.client.api.IHttpRequest
    • toString

      public String toString()
      Overrides:
      toString in class Object