cn.net.wanmo.common.http.apache.HttpBase Maven / Gradle / Ivy
package cn.net.wanmo.common.http.apache;
import org.apache.http.HttpResponse;
import org.apache.http.client.HttpClient;
import org.apache.http.client.entity.EntityBuilder;
import org.apache.http.client.methods.HttpGet;
import org.apache.http.client.methods.HttpPost;
import org.apache.http.entity.mime.MultipartEntityBuilder;
import org.apache.http.message.BasicNameValuePair;
import java.util.ArrayList;
import java.util.List;
public abstract class HttpBase {
// ======================================================================
protected HttpClient client;
protected HttpGet httpGet;
protected HttpPost httpPost;
protected List paramsList = new ArrayList<>();
protected EntityBuilder entityBuilder;
protected MultipartEntityBuilder multipartEntityBuilder;
protected HttpResponse response;
protected boolean isMultipart = false;
// ======================================================================
protected Method method = Method.GET;
protected HttpConfig config = new HttpConfig();
protected String url;
protected String body;
}