Class BaseHttpClientInvocation

java.lang.Object
ca.uhn.fhir.rest.client.impl.BaseHttpClientInvocation
Direct Known Subclasses:
HttpDeleteClientInvocation, HttpGetClientInvocation, HttpPatchClientInvocation, HttpPostClientInvocation, HttpPutClientInvocation, HttpSimpleGetClientInvocation

public abstract class BaseHttpClientInvocation extends Object
  • Constructor Details

  • Method Details

    • addHeader

      public void addHeader(String theName, String theValue)
    • asHttpRequest

      public abstract ca.uhn.fhir.rest.client.api.IHttpRequest asHttpRequest(String theUrlBase, Map<String,​List<String>> theExtraParams, ca.uhn.fhir.rest.api.EncodingEnum theEncoding, Boolean thePrettyPrint)
      Create an HTTP request out of this client request
      Parameters:
      theUrlBase - The FHIR server base url (with a trailing "/")
      theExtraParams - Any extra request parameters the server wishes to add
      theEncoding - The encoding to use for any serialized content sent to the server
    • createHttpRequest

      protected ca.uhn.fhir.rest.client.api.IHttpRequest createHttpRequest(String theUrl, ca.uhn.fhir.rest.api.EncodingEnum theEncoding, ca.uhn.fhir.rest.api.RequestTypeEnum theRequestType)
      Create an HTTP request for the given url, encoding and request-type
      Parameters:
      theUrl - The complete FHIR url to which the http request will be sent
      theEncoding - The encoding to use for any serialized content sent to the server
      theRequestType - the type of HTTP request (GET, DELETE, ..)
    • getContext

      public ca.uhn.fhir.context.FhirContext getContext()
      Returns the FHIR context associated with this client
      Returns:
      the myContext
    • getHeaders

      public List<ca.uhn.fhir.rest.client.api.Header> getHeaders()
      Returns the http headers to be sent with the request
    • getRestfulClientFactory

      public ca.uhn.fhir.rest.client.api.IRestfulClientFactory getRestfulClientFactory()
      Get the restfull client factory
    • appendExtraParamsWithQuestionMark

      public static void appendExtraParamsWithQuestionMark(Map<String,​List<String>> theExtraParams, StringBuilder theUrlBuilder, boolean theWithQuestionMark)