All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.aeontronix.enhancedmule.tools.util.EMHttpClientDefaultImpl Maven / Gradle / Ivy

There is a newer version: 2.0.0-alpha4
Show newest version
/*
 * Copyright (c) Aeontronix 2020
 */

package com.aeontronix.enhancedmule.tools.util;

import org.apache.http.client.ClientProtocolException;
import org.apache.http.client.methods.CloseableHttpResponse;
import org.apache.http.client.methods.HttpRequestBase;
import org.apache.http.impl.client.CloseableHttpClient;

import java.io.IOException;

public class EMHttpClientDefaultImpl implements EMHttpClient {
    private CloseableHttpClient httpClient;

    public EMHttpClientDefaultImpl(CloseableHttpClient httpClient) {
        this.httpClient = httpClient;
    }

    @Override
    public CloseableHttpResponse execute(HttpRequestBase request) throws IOException, ClientProtocolException {
        return httpClient.execute(request);
    }

    @Override
    public void close() throws IOException {
        httpClient.close();
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy