Package ca.uhn.fhir.okhttp.client
Class OkHttpRestfulClient
java.lang.Object
ca.uhn.fhir.okhttp.client.OkHttpRestfulClient
- All Implemented Interfaces:
ca.uhn.fhir.rest.client.api.IHttpClient
A Http Request based on OkHttp. This is an adapter around the class
OkHttpClient- Author:
- Matthew Clarke | matthew.clarke@orionhealth.com | Orion Health
-
Constructor Summary
ConstructorsConstructorDescriptionOkHttpRestfulClient(okhttp3.Call.Factory theClient, StringBuilder theUrl, Map<String,List<String>> theIfNoneExistParams, String theIfNoneExistString, ca.uhn.fhir.rest.api.RequestTypeEnum theRequestType, List<ca.uhn.fhir.rest.client.api.Header> theHeaders) -
Method Summary
Modifier and TypeMethodDescriptionca.uhn.fhir.rest.client.api.IHttpRequestcreateBinaryRequest(ca.uhn.fhir.context.FhirContext theContext, org.hl7.fhir.instance.model.api.IBaseBinary theBinary)ca.uhn.fhir.rest.client.api.IHttpRequestcreateByteRequest(ca.uhn.fhir.context.FhirContext theContext, String theContents, String theContentType, ca.uhn.fhir.rest.api.EncodingEnum theEncoding)ca.uhn.fhir.rest.client.api.IHttpRequestcreateGetRequest(ca.uhn.fhir.context.FhirContext theContext, ca.uhn.fhir.rest.api.EncodingEnum theEncoding)ca.uhn.fhir.rest.client.api.IHttpRequestcreateParamRequest(ca.uhn.fhir.context.FhirContext theContext, Map<String,List<String>> theParams, ca.uhn.fhir.rest.api.EncodingEnum theEncoding)static StringBuildernewHeaderBuilder(StringBuilder baseUrl)
-
Constructor Details
-
OkHttpRestfulClient
public OkHttpRestfulClient(okhttp3.Call.Factory theClient, StringBuilder theUrl, Map<String,List<String>> theIfNoneExistParams, String theIfNoneExistString, ca.uhn.fhir.rest.api.RequestTypeEnum theRequestType, List<ca.uhn.fhir.rest.client.api.Header> theHeaders)
-
-
Method Details
-
createByteRequest
public ca.uhn.fhir.rest.client.api.IHttpRequest createByteRequest(ca.uhn.fhir.context.FhirContext theContext, String theContents, String theContentType, ca.uhn.fhir.rest.api.EncodingEnum theEncoding)- Specified by:
createByteRequestin interfaceca.uhn.fhir.rest.client.api.IHttpClient
-
createParamRequest
public ca.uhn.fhir.rest.client.api.IHttpRequest createParamRequest(ca.uhn.fhir.context.FhirContext theContext, Map<String,List<String>> theParams, ca.uhn.fhir.rest.api.EncodingEnum theEncoding)- Specified by:
createParamRequestin interfaceca.uhn.fhir.rest.client.api.IHttpClient
-
createBinaryRequest
public ca.uhn.fhir.rest.client.api.IHttpRequest createBinaryRequest(ca.uhn.fhir.context.FhirContext theContext, org.hl7.fhir.instance.model.api.IBaseBinary theBinary)- Specified by:
createBinaryRequestin interfaceca.uhn.fhir.rest.client.api.IHttpClient
-
createGetRequest
public ca.uhn.fhir.rest.client.api.IHttpRequest createGetRequest(ca.uhn.fhir.context.FhirContext theContext, ca.uhn.fhir.rest.api.EncodingEnum theEncoding)- Specified by:
createGetRequestin interfaceca.uhn.fhir.rest.client.api.IHttpClient
-
newHeaderBuilder
-