Package ca.uhn.fhir.rest.client.apache
Class ApacheHttpRequest
- java.lang.Object
-
- ca.uhn.fhir.rest.client.apache.ApacheHttpRequest
-
- All Implemented Interfaces:
ca.uhn.fhir.rest.client.api.IHttpRequest
public class ApacheHttpRequest extends Object implements ca.uhn.fhir.rest.client.api.IHttpRequest
A Http Request based on Apache. This is an adapter around the classHttpRequestBase- Author:
- Peter Van Houte | peter.vanhoute@agfa.com | Agfa Healthcare
-
-
Constructor Summary
Constructors Constructor Description ApacheHttpRequest(org.apache.http.client.HttpClient theClient, org.apache.http.client.methods.HttpRequestBase theApacheRequest)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddHeader(String theName, String theValue)ca.uhn.fhir.rest.client.api.IHttpResponseexecute()Map<String,List<String>>getAllHeaders()org.apache.http.client.methods.HttpRequestBasegetApacheRequest()Get the ApacheRequestStringgetHttpVerbName()StringgetRequestBodyFromStream()StringgetUri()voidremoveHeaders(String theHeaderName)StringtoString()
-
-
-
Constructor Detail
-
ApacheHttpRequest
public ApacheHttpRequest(org.apache.http.client.HttpClient theClient, org.apache.http.client.methods.HttpRequestBase theApacheRequest)
-
-
Method Detail
-
addHeader
public void addHeader(String theName, String theValue)
- Specified by:
addHeaderin interfaceca.uhn.fhir.rest.client.api.IHttpRequest
-
execute
public ca.uhn.fhir.rest.client.api.IHttpResponse execute() throws IOException
- Specified by:
executein interfaceca.uhn.fhir.rest.client.api.IHttpRequest- Throws:
IOException
-
getAllHeaders
public Map<String,List<String>> getAllHeaders()
- Specified by:
getAllHeadersin interfaceca.uhn.fhir.rest.client.api.IHttpRequest
-
getApacheRequest
public org.apache.http.client.methods.HttpRequestBase getApacheRequest()
Get the ApacheRequest- Returns:
- the ApacheRequest
-
getHttpVerbName
public String getHttpVerbName()
- Specified by:
getHttpVerbNamein interfaceca.uhn.fhir.rest.client.api.IHttpRequest
-
removeHeaders
public void removeHeaders(String theHeaderName)
- Specified by:
removeHeadersin interfaceca.uhn.fhir.rest.client.api.IHttpRequest
-
getRequestBodyFromStream
public String getRequestBodyFromStream() throws IOException
- Specified by:
getRequestBodyFromStreamin interfaceca.uhn.fhir.rest.client.api.IHttpRequest- Throws:
IOException
-
getUri
public String getUri()
- Specified by:
getUriin interfaceca.uhn.fhir.rest.client.api.IHttpRequest
-
-