public class ApacheHttpRequest extends Object implements IHttpRequest
HttpRequestBase| Constructor and Description |
|---|
ApacheHttpRequest(org.apache.http.client.HttpClient theClient,
org.apache.http.client.methods.HttpRequestBase theApacheRequest) |
| Modifier and Type | Method and Description |
|---|---|
void |
addHeader(String theName,
String theValue)
Add a header to the request
|
IHttpResponse |
execute()
Execute the request
|
Map<String,List<String>> |
getAllHeaders() |
org.apache.http.client.methods.HttpRequestBase |
getApacheRequest()
Get the ApacheRequest
|
String |
getHttpVerbName()
Return the HTTP verb (e.g.
|
String |
getRequestBodyFromStream()
Return the requestbody as a string.
|
String |
getUri()
Return the request URI, or null
|
String |
toString() |
public ApacheHttpRequest(org.apache.http.client.HttpClient theClient, org.apache.http.client.methods.HttpRequestBase theApacheRequest)
public void addHeader(String theName, String theValue)
IHttpRequestaddHeader in interface IHttpRequesttheName - the header nametheValue - the header valuepublic IHttpResponse execute() throws IOException
IHttpRequestexecute in interface IHttpRequestIOExceptionpublic Map<String,List<String>> getAllHeaders()
getAllHeaders in interface IHttpRequestpublic org.apache.http.client.methods.HttpRequestBase getApacheRequest()
public String getHttpVerbName()
IHttpRequestgetHttpVerbName in interface IHttpRequestpublic String getRequestBodyFromStream() throws IOException
IHttpRequestgetRequestBodyFromStream in interface IHttpRequestIOExceptionpublic String getUri()
IHttpRequestgetUri in interface IHttpRequestCopyright © 2014–2017 University Health Network. All rights reserved.