Interface IRestfulClient

All Known Subinterfaces:
IBasicClient, IGenericClient

public interface IRestfulClient
  • Method Details

    • getInterceptorService

      Sets the interfceptor service used by this client
      Since:
      3.8.0
    • setInterceptorService

      void setInterceptorService(@Nonnull IInterceptorService theInterceptorService)
      Sets the interfceptor service used by this client
      Since:
      3.8.0
    • fetchResourceFromUrl

      <T extends IBaseResource> T fetchResourceFromUrl(Class<T> theResourceType, String theUrl)
      Retrieve the contents at the given URL and parse them as a resource. This method could be used as a low level implementation of a read/vread/search operation.
      Parameters:
      theResourceType - The resource type to parse
      theUrl - The URL to load
      Returns:
      The parsed resource
    • getEncoding

      Returns the encoding that will be used on requests. Default is null, which means the client will not explicitly request an encoding. (This is standard behaviour according to the FHIR specification)
    • setEncoding

      void setEncoding(EncodingEnum theEncoding)
      Specifies that the client should use the given encoding to do its queries. This means that the client will append the "_format" param to GET methods (read/search/etc), and will add an appropriate header for write methods.
      Parameters:
      theEncoding - The encoding to use in the request, or null not specify an encoding (which generally implies the use of XML). The default is null.
    • getFhirContext

      Returns the FHIR context associated with this client
    • getHttpClient

      Do not call this method in client code. It is a part of the internal HAPI API and is subject to change!
    • getServerBase

      Base URL for the server, with no trailing "/"
    • registerInterceptor

      void registerInterceptor(Object theInterceptor)
      Register a new interceptor for this client. An interceptor can be used to add additional logging, or add security headers, or pre-process responses, etc.

      This is a convenience method for performing the following call: getInterceptorService().registerInterceptor(theInterceptor)

    • setPrettyPrint

      void setPrettyPrint(Boolean thePrettyPrint)
      Specifies that the client should request that the server respond with "pretty printing" enabled. Note that this is a non-standard parameter, not all servers will support it.
      Parameters:
      thePrettyPrint - The pretty print flag to use in the request (default is false)
    • setSummary

      void setSummary(SummaryEnum theSummary)
      If not set to null, specifies a value for the _summary parameter to be applied globally on this client.
    • unregisterInterceptor

      void unregisterInterceptor(Object theInterceptor)
      Remove an interceptor that was previously registered using registerInterceptor(Object).

      This is a convenience method for performing the following call: getInterceptorService().unregisterInterceptor(theInterceptor)

    • setFormatParamStyle

      void setFormatParamStyle(RequestFormatParamStyleEnum theRequestFormatParamStyle)
      Configures what style of _format parameter should be used in requests