public abstract class BaseHttpClient extends Object implements IHttpClient
| Modifier and Type | Field and Description |
|---|---|
protected RequestTypeEnum |
myRequestType |
protected StringBuilder |
myUrl |
| Constructor and Description |
|---|
BaseHttpClient(StringBuilder theUrl,
Map<String,List<String>> theIfNoneExistParams,
String theIfNoneExistString,
RequestTypeEnum theRequestType,
List<Header> theHeaders)
Constructor
|
| Modifier and Type | Method and Description |
|---|---|
void |
addHeadersToRequest(IHttpRequest theHttpRequest,
EncodingEnum theEncoding,
FhirContext theContext) |
IHttpRequest |
createBinaryRequest(FhirContext theContext,
IBaseBinary theBinary)
Create a binary request
|
IHttpRequest |
createByteRequest(FhirContext theContext,
String theContents,
String theContentType,
EncodingEnum theEncoding)
Create a byte request
|
IHttpRequest |
createGetRequest(FhirContext theContext,
EncodingEnum theEncoding)
Create a normal http get request
|
protected abstract IHttpRequest |
createHttpRequest() |
protected abstract IHttpRequest |
createHttpRequest(byte[] theContent) |
protected abstract IHttpRequest |
createHttpRequest(Map<String,List<String>> theParams) |
protected abstract IHttpRequest |
createHttpRequest(String theContents) |
IHttpRequest |
createParamRequest(FhirContext theContext,
Map<String,List<String>> theParams,
EncodingEnum theEncoding)
Create a parameter request
|
protected final RequestTypeEnum myRequestType
protected final StringBuilder myUrl
public BaseHttpClient(StringBuilder theUrl, Map<String,List<String>> theIfNoneExistParams, String theIfNoneExistString, RequestTypeEnum theRequestType, List<Header> theHeaders)
public void addHeadersToRequest(IHttpRequest theHttpRequest, EncodingEnum theEncoding, FhirContext theContext)
public IHttpRequest createBinaryRequest(FhirContext theContext, IBaseBinary theBinary)
IHttpClientcreateBinaryRequest in interface IHttpClienttheContext - TODOtheBinary - the binarypublic IHttpRequest createByteRequest(FhirContext theContext, String theContents, String theContentType, EncodingEnum theEncoding)
IHttpClientcreateByteRequest in interface IHttpClienttheContext - TODOtheContents - the contentstheContentType - the contentTypetheEncoding - the encodingpublic IHttpRequest createGetRequest(FhirContext theContext, EncodingEnum theEncoding)
IHttpClientcreateGetRequest in interface IHttpClienttheContext - TODOtheEncoding - the request encodingprotected abstract IHttpRequest createHttpRequest()
protected abstract IHttpRequest createHttpRequest(byte[] theContent)
protected abstract IHttpRequest createHttpRequest(Map<String,List<String>> theParams)
protected abstract IHttpRequest createHttpRequest(String theContents)
public IHttpRequest createParamRequest(FhirContext theContext, Map<String,List<String>> theParams, EncodingEnum theEncoding)
IHttpClientcreateParamRequest in interface IHttpClienttheContext - TODOtheParams - the parameterstheEncoding - the encodingCopyright © 2014–2017 University Health Network. All rights reserved.