Class BaseRequests
java.lang.Object
com.github.angleshq.angles.api.requests.BaseRequests
- Direct Known Subclasses:
BuildRequests,EnvironmentRequests,ExecutionRequests,ScreenshotRequests,TeamRequests
-
Field Summary
Fields -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedBaseRequests(String baseUrl) protectedBaseRequests(String baseUrl, org.apache.http.client.config.RequestConfig requestConfig) -
Method Summary
Modifier and TypeMethodDescriptionprotected StringgetDefaultErrorMessage(org.apache.http.client.methods.CloseableHttpResponse response) protected voidprocessErrorResponse(org.apache.http.client.methods.CloseableHttpResponse response) protected <T> TprocessResponse(org.apache.http.client.methods.CloseableHttpResponse response, Class<T> responseClass) protected org.apache.http.client.methods.CloseableHttpResponsesendDelete(String path) protected org.apache.http.client.methods.CloseableHttpResponsesendJSONGet(String path) protected org.apache.http.client.methods.CloseableHttpResponsesendJSONGet(String path, Map<String, Object> parameters) protected org.apache.http.client.methods.CloseableHttpResponsesendJSONPost(String path, Object message) protected org.apache.http.client.methods.CloseableHttpResponsesendJSONPut(String path, Object message) protected org.apache.http.client.methods.CloseableHttpResponsesendMultiPartEntity(String path, Map<String, String> headers, org.apache.http.HttpEntity entity)
-
Field Details
-
client
protected org.apache.http.impl.client.CloseableHttpClient client -
baseUrl
-
gson
protected com.google.gson.Gson gson
-
-
Constructor Details
-
BaseRequests
-
BaseRequests
-
-
Method Details
-
sendJSONPost
protected org.apache.http.client.methods.CloseableHttpResponse sendJSONPost(String path, Object message) throws IOException - Throws:
IOException
-
sendMultiPartEntity
protected org.apache.http.client.methods.CloseableHttpResponse sendMultiPartEntity(String path, Map<String, String> headers, org.apache.http.HttpEntity entity) throws IOException- Throws:
IOException
-
sendJSONGet
protected org.apache.http.client.methods.CloseableHttpResponse sendJSONGet(String path) throws IOException - Throws:
IOException
-
sendJSONGet
protected org.apache.http.client.methods.CloseableHttpResponse sendJSONGet(String path, Map<String, Object> parameters) throws IOException, URISyntaxException- Throws:
IOExceptionURISyntaxException
-
sendDelete
protected org.apache.http.client.methods.CloseableHttpResponse sendDelete(String path) throws IOException - Throws:
IOException
-
sendJSONPut
protected org.apache.http.client.methods.CloseableHttpResponse sendJSONPut(String path, Object message) throws IOException - Throws:
IOException
-
getDefaultErrorMessage
protected String getDefaultErrorMessage(org.apache.http.client.methods.CloseableHttpResponse response) -
processResponse
protected <T> T processResponse(org.apache.http.client.methods.CloseableHttpResponse response, Class<T> responseClass) throws IOException, AnglesServerException - Throws:
IOExceptionAnglesServerException
-
processErrorResponse
protected void processErrorResponse(org.apache.http.client.methods.CloseableHttpResponse response) throws AnglesServerException - Throws:
AnglesServerException
-