Class RequestExecutor


  • public class RequestExecutor
    extends Object
    Author:
    Tassilo Weidner
    • Field Detail

      • HEADER_CONTENT_TYPE_JSON

        protected static final org.apache.http.Header HEADER_CONTENT_TYPE_JSON
      • HEADER_USER_AGENT

        protected static final org.apache.http.Header HEADER_USER_AGENT
      • httpClient

        protected org.apache.http.client.HttpClient httpClient
      • objectMapper

        protected com.fasterxml.jackson.databind.ObjectMapper objectMapper
    • Constructor Detail

      • RequestExecutor

        protected RequestExecutor​(RequestInterceptorHandler requestInterceptorHandler,
                                  com.fasterxml.jackson.databind.ObjectMapper objectMapper)
    • Method Detail

      • postRequest

        protected <T> T postRequest​(String resourceUrl,
                                    RequestDto requestDto,
                                    Class<T> responseClass)
      • getRequest

        protected byte[] getRequest​(String resourceUrl)
      • executeRequest

        protected <T> T executeRequest​(org.apache.http.client.methods.HttpUriRequest httpRequest,
                                       Class<T> responseClass)
      • handleResponse

        protected <T> org.apache.http.client.ResponseHandler<T> handleResponse​(Class<T> responseClass)
      • deserializeResponse

        protected <T> T deserializeResponse​(org.apache.http.HttpEntity httpEntity,
                                            Class<T> responseClass)
      • serializeRequest

        protected org.apache.http.entity.ByteArrayEntity serializeRequest​(RequestDto dto)