com.mashape.unirest.http.utils.ClientFactory Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of unirest-java Show documentation
Show all versions of unirest-java Show documentation
Simplified, lightweight HTTP client library
The newest version!
package com.mashape.unirest.http.utils;
import org.apache.http.client.HttpClient;
import org.apache.http.impl.nio.client.CloseableHttpAsyncClient;
import com.mashape.unirest.http.options.Option;
import com.mashape.unirest.http.options.Options;
public class ClientFactory {
public static HttpClient getHttpClient() {
return (HttpClient) Options.getOption(Option.HTTPCLIENT);
}
public static CloseableHttpAsyncClient getAsyncHttpClient() {
return (CloseableHttpAsyncClient) Options.getOption(Option.ASYNCHTTPCLIENT);
}
}