public interface IClientExecutable<T extends IClientExecutable<?,Y>,Y>
| Modifier and Type | Method and Description |
|---|---|
T |
accept(String theHeaderValue)
Specifies a custom
Accept header that should be supplied with the
request. |
T |
andLogRequestAndResponse(boolean theLogRequestAndResponse)
Deprecated.
Use the client logging interceptor to log requests and responses instead. See here for more information.
|
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 |
T |
elementsSubset(String... theElements)
Request that the server return subsetted resources, containing only the elements specified in the given parameters.
|
T |
encoded(EncodingEnum theEncoding)
Request that the server respond with JSON via the Accept header and possibly also the
_format parameter if configured to do so. |
T |
encodedJson()
Request that the server respond with JSON via the Accept header and possibly also the
_format parameter if configured to do so. |
T |
encodedXml()
Request that the server respond with JSON via the Accept header and possibly also the
_format parameter if configured to do so. |
Y |
execute()
Actually execute the client operation
|
T |
preferResponseType(Class<? extends IBaseResource> theType)
Explicitly specify a custom structure type to attempt to use when parsing the response.
|
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.
|
T |
prettyPrint()
Request pretty-printed response via the
_pretty parameter |
T |
summaryMode(SummaryEnum theSummary)
Request that the server modify the response using the
_summary param |
T |
withAdditionalHeader(String theHeaderName,
String theHeaderValue)
Set a HTTP header not explicitly defined in FHIR but commonly used in real-world scenarios.
|
@Deprecated T andLogRequestAndResponse(boolean theLogRequestAndResponse)
T cacheControl(CacheControlDirective theCacheControlDirective)
Cache-Control header value, which advises the server (or any cache in front of it)
how to behave in terms of cached requestsT elementsSubset(String... theElements)
subsetElements("name", "identifier") requests that the server only return
the "name" and "identifier" fields in the returned resource, and omit any others.T encoded(EncodingEnum theEncoding)
_format parameter if configured to do so.
This method will have no effect if a custom Accept header is specified.
accept(String)T encodedJson()
_format parameter if configured to do so.
This method will have no effect if a custom Accept header is specified.
accept(String),
encoded(EncodingEnum)T encodedXml()
_format parameter if configured to do so.
This method will have no effect if a custom Accept header is specified.
accept(String),
encoded(EncodingEnum)T withAdditionalHeader(String theHeaderName, String theHeaderValue)
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
theHeaderName - header nametheHeaderValue - header valueT preferResponseType(Class<? extends IBaseResource> theType)
See Profiles and Extensions for more information on using custom structures
T preferResponseTypes(List<Class<? extends IBaseResource>> theTypes)
See Profiles and Extensions for more information on using custom structures
T prettyPrint()
_pretty parameterT summaryMode(SummaryEnum theSummary)
_summary paramT accept(String theHeaderValue)
Accept header that should be supplied with the
request.
Note that this method overrides any encoding preferences specified with
encodedJson() or encodedXml(). It is generally easier to
just use those methods if you simply want to request a specific FHIR encoding.
theHeaderValue - The header value, e.g. "application/fhir+json". Constants such
as Constants.CT_FHIR_XML_NEW and
Constants.CT_FHIR_JSON_NEW may
be useful. If set to null or an empty string, the
default Accept header will be used.encoded(EncodingEnum),
encodedJson(),
encodedXml()Copyright © 2014–2019 University Health Network. All rights reserved.