Interface IClientExecutable<T extends IClientExecutable<?,​Y>,​Y>

    • Method Detail

      • andLogRequestAndResponse

        @Deprecated
        T andLogRequestAndResponse​(boolean theLogRequestAndResponse)
        Deprecated.
        Use the client logging interceptor to log requests and responses instead. See here for more information.
        If set to true, the client will log the request and response to the SLF4J logger. This can be useful for debugging, but is generally not desirable in a production situation.
      • cacheControl

        T cacheControl​(CacheControlDirective theCacheControlDirective)
        Sets the Cache-Control header value, which advises the server (or any cache in front of it) how to behave in terms of cached requests
      • elementsSubset

        T elementsSubset​(String... theElements)
        Request that the server return subsetted resources, containing only the elements specified in the given parameters. For example: subsetElements("name", "identifier") requests that the server only return the "name" and "identifier" fields in the returned resource, and omit any others.
      • withAdditionalHeader

        T withAdditionalHeader​(String theHeaderName,
                               String theHeaderValue)
        Set a HTTP header not explicitly defined in FHIR but commonly used in real-world scenarios. One important example is to set the Authorization header (e.g. Basic Auth or OAuth2-based Bearer auth), which tends to be cumbersome using IClientInterceptors, particularly when REST clients shall be reused and are thus supposed to remain stateless.

        It is the responsibility of the caller to care for proper encoding of the header value, e.g. using Base64.

        This is a short-cut alternative to using a corresponding client interceptor

        Parameters:
        theHeaderName - header name
        theHeaderValue - header value
        Returns:
      • execute

        Y execute()
        Actually execute the client operation
      • preferResponseType

        T preferResponseType​(Class<? extends IBaseResource> theType)
        Explicitly specify a custom structure type to attempt to use when parsing the response. This is useful for invocations where the response is a Bundle/Parameters containing nested resources, and you want to use specific custom structures for those nested resources.

        See Profiles and Extensions for more information on using custom structures

      • preferResponseTypes

        T preferResponseTypes​(List<Class<? extends IBaseResource>> theTypes)
        Explicitly specify a list of custom structure types to attempt to use (in order from most to least preferred) when parsing the response. This is useful for invocations where the response is a Bundle/Parameters containing nested resources, and you want to use specific custom structures for those nested resources.

        See Profiles and Extensions for more information on using custom structures

      • prettyPrint

        T prettyPrint()
        Request pretty-printed response via the _pretty parameter
      • summaryMode

        T summaryMode​(SummaryEnum theSummary)
        Request that the server modify the response using the _summary param