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

com.github.df.restypass.http.client.HttpClientWrapper Maven / Gradle / Ivy

There is a newer version: 1.5.1
Show newest version
package com.github.df.restypass.http.client;

import lombok.Data;
import org.asynchttpclient.AsyncHttpClient;
import org.asynchttpclient.AsyncHttpClientConfig;
import org.asynchttpclient.DefaultAsyncHttpClient;

/**
 * Http Client Config 包装类
 * Created by darrenfu on 17-6-24.
 */
@Data
public class HttpClientWrapper {

    private AsyncHttpClient client;

    private AsyncHttpClientConfig config;

    public HttpClientWrapper(AsyncHttpClientConfig config) {
        this.client = new DefaultAsyncHttpClient(config);
        this.config = config;
    }

    public HttpClientWrapper(AsyncHttpClient client, AsyncHttpClientConfig config) {
        this.client = client;
        this.config = config;
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy