public class RestfulServer extends javax.servlet.http.HttpServlet implements IRestfulServer<ServletRequestDetails>
| Modifier and Type | Field and Description |
|---|---|
static ETagSupportEnum |
DEFAULT_ETAG_SUPPORT
Default setting for
ETag Support: ETagSupportEnum.ENABLED |
static ca.uhn.fhir.rest.api.PreferReturnEnum |
DEFAULT_PREFER_RETURN
Default value for
setDefaultPreferReturn(PreferReturnEnum) |
static String |
REQUEST_START_TIME
All incoming requests will have an attribute added to
ServletRequest.getAttribute(String)
with this key. |
static String |
SERVLET_CONTEXT_ATTRIBUTE
Requests will have an HttpServletRequest attribute set with this name, containing the servlet
context, in order to avoid a dependency on Servlet-API 3.0+
|
| Constructor and Description |
|---|
RestfulServer()
Constructor.
|
RestfulServer(ca.uhn.fhir.context.FhirContext theCtx)
Constructor
|
| Modifier and Type | Method and Description |
|---|---|
void |
addHeadersToResponse(javax.servlet.http.HttpServletResponse theHttpResponse)
This method is called prior to sending a response to incoming requests.
|
RestulfulServerConfiguration |
createConfiguration() |
protected List<String> |
createPoweredByAttributes() |
protected String |
createPoweredByHeader()
Subclasses may override to provide their own powered by
header.
|
protected String |
createPoweredByHeaderComponentName()
Subclasses my override
|
protected String |
createPoweredByHeaderProductName()
Subclasses my override
|
protected String |
createPoweredByHeaderProductVersion()
Subclasses my override
|
void |
destroy() |
BaseMethodBinding<?> |
determineResourceMethod(RequestDetails requestDetails,
String requestPath)
Figure out and return whichever method binding is appropriate for
the given request
|
protected void |
doDelete(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response) |
protected void |
doGet(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response) |
protected void |
doOptions(javax.servlet.http.HttpServletRequest theReq,
javax.servlet.http.HttpServletResponse theResp) |
protected void |
doPost(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response) |
protected void |
doPut(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response) |
protected static int |
escapedLength(String theServletPath)
Count length of URL string, but treating unescaped sequences (e.g.
|
ca.uhn.fhir.context.api.AddProfileTagEnum |
getAddProfileTag()
Deprecated.
As of HAPI FHIR 1.5, this property has been moved to
FhirContext.setAddProfileTagWhenEncoding(AddProfileTagEnum) |
ca.uhn.fhir.context.api.BundleInclusionRule |
getBundleInclusionRule() |
ca.uhn.fhir.rest.api.PreferReturnEnum |
getDefaultPreferReturn()
By default, server create/update/patch/transaction methods return a copy of the resource
as it was stored.
|
ca.uhn.fhir.rest.api.EncodingEnum |
getDefaultResponseEncoding()
Returns the default encoding to return (XML/JSON) if an incoming request does not specify a preference (either
with the
_format URL parameter, or with an Accept header
in the request. |
ElementsSupportEnum |
getElementsSupport() |
ETagSupportEnum |
getETagSupport() |
ca.uhn.fhir.context.FhirContext |
getFhirContext()
Gets the
FhirContext associated with this server. |
String |
getImplementationDescription() |
List<IServerInterceptor> |
getInterceptors_()
Deprecated.
As of HAPI FHIR 3.8.0, use
getInterceptorService() to access the interceptor service. You can register and unregister interceptors using this service. |
ca.uhn.fhir.interceptor.api.IInterceptorService |
getInterceptorService()
Returns the interceptor registry for this service.
|
IPagingProvider |
getPagingProvider()
Returns the paging provider for this server
|
Collection<Object> |
getPlainProviders()
Provides the non-resource specific providers which implement method calls on this server
|
protected String |
getRequestPath(String requestFullPath,
String servletContextPath,
String servletPath)
Allows users of RestfulServer to override the getRequestPath method to let them build their custom request path
implementation
|
Collection<ResourceBinding> |
getResourceBindings() |
Collection<IResourceProvider> |
getResourceProviders()
Provides the resource providers for this server
|
IServerAddressStrategy |
getServerAddressStrategy()
Get the server address strategy, which is used to determine what base URL to provide clients to refer to this
server.
|
String |
getServerBaseForRequest(ServletRequestDetails theRequest)
Returns the server base URL (with no trailing '/') for a given request
|
List<BaseMethodBinding<?>> |
getServerBindings()
Returns the method bindings for this server which are not specific to any particular resource type.
|
Object |
getServerConformanceProvider()
Returns the server conformance provider, which is the provider that is used to generate the server's conformance
(metadata) statement if one has been explicitly defined.
|
String |
getServerName()
Gets the server's name, as exported in conformance profiles exported by the server.
|
IResourceProvider |
getServerProfilesProvider() |
String |
getServerVersion()
Gets the server's version, as exported in conformance profiles exported by the server.
|
protected void |
handleRequest(ca.uhn.fhir.rest.api.RequestTypeEnum theRequestType,
javax.servlet.http.HttpServletRequest theRequest,
javax.servlet.http.HttpServletResponse theResponse) |
void |
init()
Initializes the server.
|
protected void |
initialize()
This method may be overridden by subclasses to do perform initialization that needs to be performed prior to the
server being used.
|
boolean |
isDefaultPrettyPrint()
Should the server "pretty print" responses by default (requesting clients can always override this default by
supplying an
Accept header in the request, or a _pretty
parameter in the request URL. |
boolean |
isIgnoreServerParsedRequestParameters()
If set to
true (the default is true) this server will not
use the parsed request parameters (URL parameters and HTTP POST form contents) but
will instead parse these values manually from the request URL and request body. |
boolean |
isUncompressIncomingContents()
Should the server attempt to decompress incoming request contents (default is
true). |
void |
populateRequestDetailsFromRequestPath(RequestDetails theRequestDetails,
String theRequestPath) |
void |
registerInterceptor(Object theInterceptor)
Registers an interceptor.
|
void |
registerProvider(Object provider)
Register a single provider.
|
void |
registerProviders(Collection<?> theProviders)
Register a group of theProviders.
|
protected void |
registerProviders(Collection<?> theProviders,
boolean inInit) |
void |
registerProviders(Object... theProviders)
Register a group of providers.
|
Object |
returnResponse(ServletRequestDetails theRequest,
ParseAction<?> outcome,
int operationStatus,
boolean allowPrefer,
ca.uhn.fhir.rest.api.MethodOutcome response,
String resourceName) |
protected void |
service(javax.servlet.http.HttpServletRequest theReq,
javax.servlet.http.HttpServletResponse theResp) |
void |
setAddProfileTag(ca.uhn.fhir.context.api.AddProfileTagEnum theAddProfileTag)
Deprecated.
As of HAPI FHIR 1.5, this property has been moved to
FhirContext.setAddProfileTagWhenEncoding(AddProfileTagEnum) |
void |
setBundleInclusionRule(ca.uhn.fhir.context.api.BundleInclusionRule theBundleInclusionRule)
Set how bundle factory should decide whether referenced resources should be included in bundles
|
void |
setDefaultPreferReturn(ca.uhn.fhir.rest.api.PreferReturnEnum theDefaultPreferReturn)
By default, server create/update/patch/transaction methods return a copy of the resource
as it was stored.
|
void |
setDefaultPrettyPrint(boolean theDefaultPrettyPrint)
Should the server "pretty print" responses by default (requesting clients can always override this default by
supplying an
Accept header in the request, or a _pretty
parameter in the request URL. |
void |
setDefaultResponseEncoding(ca.uhn.fhir.rest.api.EncodingEnum theDefaultResponseEncoding)
Sets the default encoding to return (XML/JSON) if an incoming request does not specify a preference (either with
the
_format URL parameter, or with an Accept header in
the request. |
void |
setElementsSupport(ElementsSupportEnum theElementsSupport)
Sets the elements support mode.
|
void |
setETagSupport(ETagSupportEnum theETagSupport)
Sets (enables/disables) the server support for ETags.
|
void |
setFhirContext(ca.uhn.fhir.context.FhirContext theFhirContext) |
void |
setIgnoreServerParsedRequestParameters(boolean theIgnoreServerParsedRequestParameters)
If set to
true (the default is true) this server will not
use the parsed request parameters (URL parameters and HTTP POST form contents) but
will instead parse these values manually from the request URL and request body. |
void |
setImplementationDescription(String theImplementationDescription) |
void |
setInterceptors(IServerInterceptor... theInterceptors)
Deprecated.
As of HAPI FHIR 3.8.0, use
getInterceptorService() to access the interceptor service. You can register and unregister interceptors using this service. |
void |
setInterceptors(List<?> theList)
Deprecated.
As of HAPI FHIR 3.8.0, use
getInterceptorService() to access the interceptor service. You can register and unregister interceptors using this service. |
void |
setInterceptorService(ca.uhn.fhir.interceptor.api.IInterceptorService theInterceptorService)
Sets the interceptor registry for this service.
|
void |
setPagingProvider(IPagingProvider thePagingProvider)
Sets the paging provider to use, or
null to use no paging (which is the default) |
void |
setPlainProviders(Collection<Object> theProviders)
Deprecated.
This method causes inconsistent behaviour depending on the order it is called in. Use
registerProviders(Object...) instead. |
void |
setPlainProviders(Object... theProv)
Deprecated.
This method causes inconsistent behaviour depending on the order it is called in. Use
registerProviders(Object...) instead. |
void |
setProviders(Object... theProviders)
Sets the non-resource specific providers which implement method calls on this server
|
void |
setResourceProviders(Collection<IResourceProvider> theProviders)
Sets the resource providers for this server
|
void |
setResourceProviders(IResourceProvider... theResourceProviders)
Sets the resource providers for this server
|
void |
setServerAddressStrategy(IServerAddressStrategy theServerAddressStrategy)
Provide a server address strategy, which is used to determine what base URL to provide clients to refer to this
server.
|
void |
setServerConformanceProvider(Object theServerConformanceProvider)
Returns the server conformance provider, which is the provider that is used to generate the server's conformance
(metadata) statement.
|
void |
setServerName(String theServerName)
Sets the server's name, as exported in conformance profiles exported by the server.
|
void |
setServerVersion(String theServerVersion)
Gets the server's version, as exported in conformance profiles exported by the server.
|
void |
setTenantIdentificationStrategy(ITenantIdentificationStrategy theTenantIdentificationStrategy)
If provided (default is
null), the tenant identification
strategy provides a mechanism for a multitenant server to identify which tenant
a given request corresponds to. |
void |
setUncompressIncomingContents(boolean theUncompressIncomingContents)
Should the server attempt to decompress incoming request contents (default is
true). |
protected void |
throwUnknownFhirOperationException(RequestDetails requestDetails,
String requestPath,
ca.uhn.fhir.rest.api.RequestTypeEnum theRequestType) |
static void |
throwUnknownFhirOperationException(RequestDetails requestDetails,
String requestPath,
ca.uhn.fhir.rest.api.RequestTypeEnum theRequestType,
ca.uhn.fhir.context.FhirContext theFhirContext) |
protected void |
throwUnknownResourceTypeException(String theResourceName) |
void |
unregisterInterceptor(Object theInterceptor)
Unregisters an interceptor.
|
void |
unregisterProvider(Object provider)
Unregister one provider (either a Resource provider or a plain provider)
|
void |
unregisterProviders(Collection<?> providers)
Unregister a
Collection of providers |
protected void |
validateRequest(ServletRequestDetails theRequestDetails) |
doHead, doTrace, getLastModified, servicepublic static final String REQUEST_START_TIME
ServletRequest.getAttribute(String)
with this key. The value will be a Java Date with the time that request processing began.public static final ETagSupportEnum DEFAULT_ETAG_SUPPORT
ETag Support: ETagSupportEnum.ENABLEDpublic static final String SERVLET_CONTEXT_ATTRIBUTE
public static final ca.uhn.fhir.rest.api.PreferReturnEnum DEFAULT_PREFER_RETURN
setDefaultPreferReturn(PreferReturnEnum)public RestfulServer()
FhirContext is passed in to the server (either through the constructor, or
through setFhirContext(FhirContext)) the server will determine which
version of FHIR to support through classpath scanning. This is brittle, and it is highly recommended to explicitly
specify a FHIR version.public RestfulServer(ca.uhn.fhir.context.FhirContext theCtx)
public void addHeadersToResponse(javax.servlet.http.HttpServletResponse theHttpResponse)
Use caution if overriding this method: it is recommended to call super.addHeadersToResponse to avoid
inadvertently disabling functionality.
public RestulfulServerConfiguration createConfiguration()
protected List<String> createPoweredByAttributes()
protected String createPoweredByHeader()
createPoweredByAttributes() instead and adding your own
fragments to the list.protected String createPoweredByHeaderComponentName()
createPoweredByHeader()protected String createPoweredByHeaderProductName()
createPoweredByHeader()protected String createPoweredByHeaderProductVersion()
createPoweredByHeader()public void destroy()
destroy in interface javax.servlet.Servletdestroy in class javax.servlet.GenericServletpublic BaseMethodBinding<?> determineResourceMethod(RequestDetails requestDetails, String requestPath)
protected void doDelete(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws javax.servlet.ServletException, IOException
doDelete in class javax.servlet.http.HttpServletjavax.servlet.ServletExceptionIOExceptionprotected void doGet(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws javax.servlet.ServletException, IOException
doGet in class javax.servlet.http.HttpServletjavax.servlet.ServletExceptionIOExceptionprotected void doOptions(javax.servlet.http.HttpServletRequest theReq, javax.servlet.http.HttpServletResponse theResp) throws javax.servlet.ServletException, IOException
doOptions in class javax.servlet.http.HttpServletjavax.servlet.ServletExceptionIOExceptionprotected void doPost(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws javax.servlet.ServletException, IOException
doPost in class javax.servlet.http.HttpServletjavax.servlet.ServletExceptionIOExceptionprotected void doPut(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws javax.servlet.ServletException, IOException
doPut in class javax.servlet.http.HttpServletjavax.servlet.ServletExceptionIOException@Deprecated public ca.uhn.fhir.context.api.AddProfileTagEnum getAddProfileTag()
FhirContext.setAddProfileTagWhenEncoding(AddProfileTagEnum)getAddProfileTag in interface IRestfulServerDefaults@Deprecated public void setAddProfileTag(ca.uhn.fhir.context.api.AddProfileTagEnum theAddProfileTag)
FhirContext.setAddProfileTagWhenEncoding(AddProfileTagEnum)AddProfileTagEnum.NEVER
(which is the default), the server will automatically add a profile tag based on
the class of the resource(s) being returned.theAddProfileTag - The behaviour enum (must not be null)public ca.uhn.fhir.context.api.BundleInclusionRule getBundleInclusionRule()
getBundleInclusionRule in interface IRestfulServer<ServletRequestDetails>public void setBundleInclusionRule(ca.uhn.fhir.context.api.BundleInclusionRule theBundleInclusionRule)
theBundleInclusionRule - - inclusion rule (@see BundleInclusionRule for behaviors)public ca.uhn.fhir.rest.api.EncodingEnum getDefaultResponseEncoding()
_format URL parameter, or with an Accept header
in the request. The default is EncodingEnum.XML. Will not return null.getDefaultResponseEncoding in interface IRestfulServerDefaults_format URL parameter, or with an Accept header
in the request. The default is EncodingEnum.XML. Will not return null.public void setDefaultResponseEncoding(ca.uhn.fhir.rest.api.EncodingEnum theDefaultResponseEncoding)
_format URL parameter, or with an Accept header in
the request. The default is EncodingEnum.XML.
Note when testing this feature: Some browsers will include "application/xml" in their Accept header, which means that the
public ETagSupportEnum getETagSupport()
getETagSupport in interface IRestfulServerDefaultsnull). Default is
DEFAULT_ETAG_SUPPORTpublic void setETagSupport(ETagSupportEnum theETagSupport)
null. Default is
DEFAULT_ETAG_SUPPORTtheETagSupport - The ETag support modepublic ElementsSupportEnum getElementsSupport()
getElementsSupport in interface IRestfulServerDefaults_elements parameter on search
and read operations.public void setElementsSupport(ElementsSupportEnum theElementsSupport)
public ca.uhn.fhir.context.FhirContext getFhirContext()
FhirContext associated with this server. For efficient processing, resource providers and plain
providers should generally use this context if one is needed, as opposed to
creating their own.getFhirContext in interface IRestfulServerDefaultspublic void setFhirContext(ca.uhn.fhir.context.FhirContext theFhirContext)
public String getImplementationDescription()
public void setImplementationDescription(String theImplementationDescription)
@Deprecated public List<IServerInterceptor> getInterceptors_()
getInterceptorService() to access the interceptor service. You can register and unregister interceptors using this service.getInterceptors_ in interface IRestfulServerDefaultspublic ca.uhn.fhir.interceptor.api.IInterceptorService getInterceptorService()
getInterceptorService in interface IRestfulServerDefaultspublic void setInterceptorService(@Nonnull ca.uhn.fhir.interceptor.api.IInterceptorService theInterceptorService)
@Deprecated public void setInterceptors(@Nonnull List<?> theList)
getInterceptorService() to access the interceptor service. You can register and unregister interceptors using this service.theList - The list of interceptors (may be null)@Deprecated public void setInterceptors(IServerInterceptor... theInterceptors)
getInterceptorService() to access the interceptor service. You can register and unregister interceptors using this service.theInterceptors - The list of interceptors (may be null)public IPagingProvider getPagingProvider()
IRestfulServerDefaultsgetPagingProvider in interface IRestfulServer<ServletRequestDetails>getPagingProvider in interface IRestfulServerDefaultspublic void setPagingProvider(IPagingProvider thePagingProvider)
null to use no paging (which is the default)public Collection<Object> getPlainProviders()
getResourceProviders()@Deprecated public void setPlainProviders(Object... theProv)
registerProviders(Object...) instead.setResourceProviders(Collection)@Deprecated public void setPlainProviders(Collection<Object> theProviders)
registerProviders(Object...) instead.setResourceProviders(Collection)protected String getRequestPath(String requestFullPath, String servletContextPath, String servletPath)
requestFullPath - the full request pathservletContextPath - the servelet context pathservletPath - the servelet pathpublic Collection<ResourceBinding> getResourceBindings()
public Collection<IResourceProvider> getResourceProviders()
public void setResourceProviders(IResourceProvider... theResourceProviders)
public void setResourceProviders(Collection<IResourceProvider> theProviders)
public IServerAddressStrategy getServerAddressStrategy()
IncomingRequestAddressStrategypublic void setServerAddressStrategy(IServerAddressStrategy theServerAddressStrategy)
IncomingRequestAddressStrategypublic String getServerBaseForRequest(ServletRequestDetails theRequest)
public List<BaseMethodBinding<?>> getServerBindings()
public Object getServerConformanceProvider()
By default, the ServerConformanceProvider for the declared version of FHIR is used, but this can be changed, or
set to null to use the appropriate one for the given FHIR version.
public void setServerConformanceProvider(Object theServerConformanceProvider)
By default, the ServerConformanceProvider implementation for the declared version of FHIR is used, but this can be
changed, or set to null if you do not wish to export a conformance
statement.
IllegalStateException - Note that this method can only be called prior to initialization and will throw an
IllegalStateException if called after that.public String getServerName()
setServerName(String)public void setServerName(String theServerName)
public IResourceProvider getServerProfilesProvider()
public String getServerVersion()
public void setServerVersion(String theServerVersion)
protected void handleRequest(ca.uhn.fhir.rest.api.RequestTypeEnum theRequestType, javax.servlet.http.HttpServletRequest theRequest, javax.servlet.http.HttpServletResponse theResponse) throws javax.servlet.ServletException, IOException
javax.servlet.ServletExceptionIOExceptionprotected void validateRequest(ServletRequestDetails theRequestDetails)
public final void init() throws javax.servlet.ServletException
initialize(), which is
called immediately before beginning initialization of the restful server's internal init.init in class javax.servlet.GenericServletjavax.servlet.ServletExceptionprotected void initialize() throws javax.servlet.ServletException
javax.servlet.ServletException - If the initialization failed. Note that you should consider throwing UnavailableException
(which extends ServletException), as this is a flag to the servlet container
that the servlet is not usable.public boolean isDefaultPrettyPrint()
Accept header in the request, or a _pretty
parameter in the request URL.
The default is false
Note that this setting is ignored by ResponseHighlighterInterceptor
when streaming HTML, although even when that interceptor it used this setting will
still be honoured when streaming raw FHIR.
isDefaultPrettyPrint in interface IRestfulServerDefaultspublic void setDefaultPrettyPrint(boolean theDefaultPrettyPrint)
Accept header in the request, or a _pretty
parameter in the request URL.
The default is false
Note that this setting is ignored by ResponseHighlighterInterceptor
when streaming HTML, although even when that interceptor it used this setting will
still be honoured when streaming raw FHIR.
theDefaultPrettyPrint - The default pretty print settingpublic boolean isIgnoreServerParsedRequestParameters()
true (the default is true) this server will not
use the parsed request parameters (URL parameters and HTTP POST form contents) but
will instead parse these values manually from the request URL and request body.
This is useful because many servlet containers (e.g. Tomcat, Glassfish) will use ISO-8859-1 encoding to parse escaped URL characters instead of using UTF-8 as is specified by FHIR.
public void setIgnoreServerParsedRequestParameters(boolean theIgnoreServerParsedRequestParameters)
true (the default is true) this server will not
use the parsed request parameters (URL parameters and HTTP POST form contents) but
will instead parse these values manually from the request URL and request body.
This is useful because many servlet containers (e.g. Tomcat, Glassfish) will use ISO-8859-1 encoding to parse escaped URL characters instead of using UTF-8 as is specified by FHIR.
public boolean isUncompressIncomingContents()
true). Typically this
should be set to true unless the server has other configuration to
deal with decompressing request bodies (e.g. a filter applied to the whole server).public void setUncompressIncomingContents(boolean theUncompressIncomingContents)
true). Typically this
should be set to true unless the server has other configuration to
deal with decompressing request bodies (e.g. a filter applied to the whole server).public void populateRequestDetailsFromRequestPath(RequestDetails theRequestDetails, String theRequestPath)
public void registerInterceptor(Object theInterceptor)
getInterceptorService().registerInterceptor(theInterceptor);theInterceptor - The interceptor, must not be nullpublic void registerProvider(Object provider)
public void registerProviders(Object... theProviders)
IResourceProvider) or "plain" providers, or a mixture of the two.theProviders - a Collection of theProviders. The parameter could be null or an empty Collectionpublic void registerProviders(Collection<?> theProviders)
theProviders - a Collection of theProviders. The parameter could be null or an empty Collectionprotected void registerProviders(Collection<?> theProviders, boolean inInit)
public Object returnResponse(ServletRequestDetails theRequest, ParseAction<?> outcome, int operationStatus, boolean allowPrefer, ca.uhn.fhir.rest.api.MethodOutcome response, String resourceName) throws IOException
IOExceptionprotected void service(javax.servlet.http.HttpServletRequest theReq, javax.servlet.http.HttpServletResponse theResp) throws javax.servlet.ServletException, IOException
service in class javax.servlet.http.HttpServletjavax.servlet.ServletExceptionIOExceptionpublic void setProviders(Object... theProviders)
setResourceProviders(Collection)public void setTenantIdentificationStrategy(ITenantIdentificationStrategy theTenantIdentificationStrategy)
null), the tenant identification
strategy provides a mechanism for a multitenant server to identify which tenant
a given request corresponds to.protected void throwUnknownFhirOperationException(RequestDetails requestDetails, String requestPath, ca.uhn.fhir.rest.api.RequestTypeEnum theRequestType)
protected void throwUnknownResourceTypeException(String theResourceName)
public void unregisterInterceptor(Object theInterceptor)
getInterceptorService().unregisterInterceptor(theInterceptor);theInterceptor - The interceptor, must not be nullpublic void unregisterProvider(Object provider)
public void unregisterProviders(Collection<?> providers)
Collection of providerspublic ca.uhn.fhir.rest.api.PreferReturnEnum getDefaultPreferReturn()
Prefer header.
This setting changes the default behaviour if no Prefer header is supplied by the client.
The default is PreferReturnEnum.REPRESENTATION
getDefaultPreferReturn in interface IRestfulServer<ServletRequestDetails>public void setDefaultPreferReturn(ca.uhn.fhir.rest.api.PreferReturnEnum theDefaultPreferReturn)
Prefer header.
This setting changes the default behaviour if no Prefer header is supplied by the client.
The default is PreferReturnEnum.REPRESENTATION
protected static int escapedLength(String theServletPath)
public static void throwUnknownFhirOperationException(RequestDetails requestDetails, String requestPath, ca.uhn.fhir.rest.api.RequestTypeEnum theRequestType, ca.uhn.fhir.context.FhirContext theFhirContext)
Copyright © 2014–2019 University Health Network. All rights reserved.