Package ca.uhn.fhir.rest.client.impl
Class BaseHttpClientInvocation
- java.lang.Object
-
- ca.uhn.fhir.rest.client.impl.BaseHttpClientInvocation
-
- Direct Known Subclasses:
HttpDeleteClientInvocation,HttpGetClientInvocation,HttpPatchClientInvocation,HttpPostClientInvocation,HttpPutClientInvocation,HttpSimpleGetClientInvocation
public abstract class BaseHttpClientInvocation extends Object
-
-
Constructor Summary
Constructors Constructor Description BaseHttpClientInvocation(ca.uhn.fhir.context.FhirContext myContext)
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description voidaddHeader(String theName, String theValue)static voidappendExtraParamsWithQuestionMark(Map<String,List<String>> theExtraParams, StringBuilder theUrlBuilder, boolean theWithQuestionMark)abstract ca.uhn.fhir.rest.client.api.IHttpRequestasHttpRequest(String theUrlBase, Map<String,List<String>> theExtraParams, ca.uhn.fhir.rest.api.EncodingEnum theEncoding, Boolean thePrettyPrint)Create an HTTP request out of this client requestprotected ca.uhn.fhir.rest.client.api.IHttpRequestcreateHttpRequest(String theUrl, ca.uhn.fhir.rest.api.EncodingEnum theEncoding, ca.uhn.fhir.rest.api.RequestTypeEnum theRequestType)Create an HTTP request for the given url, encoding and request-typeca.uhn.fhir.context.FhirContextgetContext()Returns the FHIR context associated with this clientList<ca.uhn.fhir.rest.client.api.Header>getHeaders()Returns the http headers to be sent with the requestca.uhn.fhir.rest.client.api.IRestfulClientFactorygetRestfulClientFactory()Get the restfull client factory
-
-
-
Constructor Detail
-
BaseHttpClientInvocation
public BaseHttpClientInvocation(ca.uhn.fhir.context.FhirContext myContext)
-
-
Method Detail
-
asHttpRequest
public abstract ca.uhn.fhir.rest.client.api.IHttpRequest asHttpRequest(String theUrlBase, Map<String,List<String>> theExtraParams, ca.uhn.fhir.rest.api.EncodingEnum theEncoding, Boolean thePrettyPrint)
Create an HTTP request out of this client request- Parameters:
theUrlBase- The FHIR server base url (with a trailing "/")theExtraParams- Any extra request parameters the server wishes to addtheEncoding- The encoding to use for any serialized content sent to the server
-
createHttpRequest
protected ca.uhn.fhir.rest.client.api.IHttpRequest createHttpRequest(String theUrl, ca.uhn.fhir.rest.api.EncodingEnum theEncoding, ca.uhn.fhir.rest.api.RequestTypeEnum theRequestType)
Create an HTTP request for the given url, encoding and request-type- Parameters:
theUrl- The complete FHIR url to which the http request will be senttheEncoding- The encoding to use for any serialized content sent to the servertheRequestType- the type of HTTP request (GET, DELETE, ..)
-
getContext
public ca.uhn.fhir.context.FhirContext getContext()
Returns the FHIR context associated with this client- Returns:
- the myContext
-
getHeaders
public List<ca.uhn.fhir.rest.client.api.Header> getHeaders()
Returns the http headers to be sent with the request
-
getRestfulClientFactory
public ca.uhn.fhir.rest.client.api.IRestfulClientFactory getRestfulClientFactory()
Get the restfull client factory
-
appendExtraParamsWithQuestionMark
public static void appendExtraParamsWithQuestionMark(Map<String,List<String>> theExtraParams, StringBuilder theUrlBuilder, boolean theWithQuestionMark)
-
-