public class HttpRestRequest extends Object
| Modifier and Type | Method and Description |
|---|---|
HttpRestRequest |
buildRequest(HttpMethod httpMethod,
String path,
org.apache.http.HttpEntity httpEntity)
Build a HTTP request
|
static HttpRestRequest |
createRequest(RestSession session)
Creates a Rest request handling the messages of the given
RestSession |
<T> T |
executeRequest(Class<T> type)
Executes the HTTP request
|
void |
executeRequest(OutputStream outputStream)
Executes the HTTP request
|
HttpRestRequest |
setAcceptHeader(String mimeType)
Initializes the MIME type accepted by this REST request and returns a reference to this request.
|
public static HttpRestRequest createRequest(RestSession session)
RestSessionsession - the RestSession this Rest request is handling.RestSessionpublic HttpRestRequest setAcceptHeader(String mimeType)
mimeType - The MIME type accepted by this REST request.public HttpRestRequest buildRequest(HttpMethod httpMethod, String path, org.apache.http.HttpEntity httpEntity) throws ResultException
httpMethod - HTTP method (GET, POST, ...)path - REST resource URLhttpEntity - data to send with request (POST)ResultException - if the HTTP method is unknownpublic void executeRequest(OutputStream outputStream) throws ResultException
outputStream - Target stream for the responseResultException - a ResultExceptionpublic <T> T executeRequest(Class<T> type) throws ResultException
T - class for responsetype - class name for responseResultException - if HTTP entity should be save as fileCopyright © 2017–2019 SoftVision Development GmbH, Fulda, Germany. All rights reserved.