标签:param dac html 发送 oid 形式 sys http action
1.URL
2.httpclient
commons-httpclient-3.1.jar;
import org.apache.commons.httpclient.HttpClient;
import org.apache.commons.httpclient.methods.PostMethod;
import org.apache.commons.httpclient.params.HttpMethodParams;
public class Test {
public static void main(String[] args) {
String info = null;
try {
HttpClient httpclient = new HttpClient();
PostMethod post = new PostMethod("http://192.168.11.11/sssssssss/ssAction!updateYunMasCallBack.action");//
post.getParams().setParameter(HttpMethodParams.HTTP_CONTENT_CHARSET, "gbk");
post.addParameter("SpCode", "sssssss");
post.addParameter("LoginName", "ssss");
post.addParameter("Password", "ssssss");
post.addParameter("MessageContent", "你有一项编号为23你56的事务需要处理。");
post.addParameter("UserNumber", "15680805571");
post.addParameter("SerialNumber", "12345678901234567890");
post.addParameter("ScheduleTime", "");
post.addParameter("ExtendAccessNum", "");
post.addParameter("f", "1");
httpclient.executeMethod(post);
info = new String(post.getResponseBody(), "gbk");
System.out.println(info);
} catch (Exception e) {
e.printStackTrace();
}
}
}
标签:param dac html 发送 oid 形式 sys http action
原文地址:https://www.cnblogs.com/du1991/p/9506094.html