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

com.mashape.unirest.http.utils.ClientFactory Maven / Gradle / Ivy

There is a newer version: 1.0.9
Show 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);
	}
	
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy