Sop*_*iba 3 java http apache-httpclient-4.x
我正在尝试使用apache httpclient.我有一个httppost查询.要构建我的对象,我使用chrome开发人员工具提供的信息.当我连接服务器时,我在有效负载下看到一个http post请求和信息:7 | 0 | 10 | HTTP://sfe.corpe15.com:8980 /网上交易/网上交易/ | 0A6AA27FE80C74E3200C24AA537362BD | com.gwtplatform.dispatch.shared.DispatchService |执行|
这如何在Java中翻译?如何在httppost对象中发送有效负载?
谢谢!
我想到了!看起来像这样!
String payLoadLogin = "blahblahblah"
HttpPost httppost = new HttpPost(postAddress);
httppost.setHeader("X-GWT-Permutation", "3DE824138FE65400740EC1816A73CACC");
httppost.setHeader("Content-Type", "text/x-gwt-rpc; charset=UTF-8");
StringEntity se = new StringEntity(payLoadLogin );
httppost.setEntity(se);
Run Code Online (Sandbox Code Playgroud)