public abstract class BaseClient extends Object implements ca.uhn.fhir.rest.client.api.IRestfulClient
| Modifier and Type | Class and Description |
|---|---|
protected class |
BaseClient.ResourceOrBinaryResponseHandler |
protected class |
BaseClient.ResourceResponseHandler<T extends org.hl7.fhir.instance.model.api.IBaseResource> |
| Modifier and Type | Field and Description |
|---|---|
static String |
HAPI_CLIENT_KEEPRESPONSES
This property is used by unit tests - do not rely on it in production code
as it may change at any time.
|
| Modifier and Type | Method and Description |
|---|---|
protected Map<String,List<String>> |
createExtraParams(String theCustomAcceptHeader) |
<T extends org.hl7.fhir.instance.model.api.IBaseResource> |
fetchResourceFromUrl(Class<T> theResourceType,
String theUrl) |
ca.uhn.fhir.rest.api.EncodingEnum |
getEncoding() |
ca.uhn.fhir.rest.client.api.IHttpClient |
getHttpClient() |
ca.uhn.fhir.interceptor.api.IInterceptorService |
getInterceptorService() |
ca.uhn.fhir.rest.client.api.IHttpResponse |
getLastResponse()
For now, this is a part of the internal API of HAPI - Use with caution as this method may change!
|
String |
getLastResponseBody()
For now, this is a part of the internal API of HAPI - Use with caution as this method may change!
|
String |
getServerBase() |
ca.uhn.fhir.rest.api.SummaryEnum |
getSummary() |
String |
getUrlBase() |
boolean |
isKeepResponses()
For now, this is a part of the internal API of HAPI - Use with caution as this method may change!
|
boolean |
isPrettyPrint()
Returns the pretty print flag, which is a request to the server for it to return "pretty printed" responses.
|
void |
registerInterceptor(ca.uhn.fhir.rest.client.api.IClientInterceptor theInterceptor) |
void |
setDontValidateConformance(boolean theDontValidateConformance)
This method is an internal part of the HAPI API and may change, use with caution.
|
void |
setEncoding(ca.uhn.fhir.rest.api.EncodingEnum theEncoding)
Sets the encoding that will be used on requests.
|
void |
setFormatParamStyle(ca.uhn.fhir.rest.api.RequestFormatParamStyleEnum theRequestFormatParamStyle) |
void |
setInterceptorService(ca.uhn.fhir.interceptor.api.IInterceptorService theInterceptorService) |
void |
setKeepResponses(boolean theKeepResponses)
For now, this is a part of the internal API of HAPI - Use with caution as this method may change!
|
void |
setPrettyPrint(Boolean thePrettyPrint)
Sets the pretty print flag, which is a request to the server for it to return "pretty printed" responses.
|
void |
setSummary(ca.uhn.fhir.rest.api.SummaryEnum theSummary) |
void |
unregisterInterceptor(ca.uhn.fhir.rest.client.api.IClientInterceptor theInterceptor) |
public static final String HAPI_CLIENT_KEEPRESPONSES
public ca.uhn.fhir.interceptor.api.IInterceptorService getInterceptorService()
getInterceptorService in interface ca.uhn.fhir.rest.client.api.IRestfulClientpublic void setInterceptorService(@Nonnull ca.uhn.fhir.interceptor.api.IInterceptorService theInterceptorService)
setInterceptorService in interface ca.uhn.fhir.rest.client.api.IRestfulClientprotected Map<String,List<String>> createExtraParams(String theCustomAcceptHeader)
public <T extends org.hl7.fhir.instance.model.api.IBaseResource> T fetchResourceFromUrl(Class<T> theResourceType, String theUrl)
fetchResourceFromUrl in interface ca.uhn.fhir.rest.client.api.IRestfulClientpublic ca.uhn.fhir.rest.api.EncodingEnum getEncoding()
getEncoding in interface ca.uhn.fhir.rest.client.api.IRestfulClientpublic void setEncoding(ca.uhn.fhir.rest.api.EncodingEnum theEncoding)
null, which means the client will not
explicitly request an encoding. (This is perfectly acceptable behaviour according to the FHIR specification. In
this case, the server will choose which encoding to return, and the client can handle either XML or JSON)setEncoding in interface ca.uhn.fhir.rest.client.api.IRestfulClientpublic ca.uhn.fhir.rest.client.api.IHttpClient getHttpClient()
getHttpClient in interface ca.uhn.fhir.rest.client.api.IRestfulClientpublic ca.uhn.fhir.rest.client.api.IHttpResponse getLastResponse()
public String getLastResponseBody()
public String getServerBase()
getServerBase in interface ca.uhn.fhir.rest.client.api.IRestfulClientpublic ca.uhn.fhir.rest.api.SummaryEnum getSummary()
public void setSummary(ca.uhn.fhir.rest.api.SummaryEnum theSummary)
setSummary in interface ca.uhn.fhir.rest.client.api.IRestfulClientpublic String getUrlBase()
public void setFormatParamStyle(ca.uhn.fhir.rest.api.RequestFormatParamStyleEnum theRequestFormatParamStyle)
setFormatParamStyle in interface ca.uhn.fhir.rest.client.api.IRestfulClientpublic boolean isKeepResponses()
public void setKeepResponses(boolean theKeepResponses)
public boolean isPrettyPrint()
public void setPrettyPrint(Boolean thePrettyPrint)
setPrettyPrint in interface ca.uhn.fhir.rest.client.api.IRestfulClientpublic void registerInterceptor(ca.uhn.fhir.rest.client.api.IClientInterceptor theInterceptor)
registerInterceptor in interface ca.uhn.fhir.rest.client.api.IRestfulClientpublic void setDontValidateConformance(boolean theDontValidateConformance)
IRestfulClientFactory.setServerValidationModeEnum(ServerValidationModeEnum)public void unregisterInterceptor(ca.uhn.fhir.rest.client.api.IClientInterceptor theInterceptor)
unregisterInterceptor in interface ca.uhn.fhir.rest.client.api.IRestfulClientCopyright © 2014–2019 University Health Network. All rights reserved.