Http协议使用封装jar包(commons-codec-1.3.jar、commons-httpclient-3.1.jar、commons-logging-1.1.jar)
简单使用方法:
public static void main(String[] args) {
// String str1 = "http://dev.d-smart.cn/Login";
// http协议路径
String str1 = "";
HttpClient httpClient = new HttpClient();
PostMethod method = new PostMethod(str1);
try {
// 需要添加的header数据
List<Header> headers = new ArrayList<Header>();
headers.add(new Header("", ""));
headers.add(new Header("", ""));
1