修改路由器网络信息,浏览器post 提交表单,使用抓包工具抓取的数据如下:

上图中的表单数据格式为什么找不到IP等信息?
想问问,java代码使用HttpClient 发送post请求修改路由器的网络,需要怎么写代码?
我想模拟浏览器提交表单的方式,提交java代码中的变量,达到修改路由器网络的目的。
我测试代码如下:
public void updateNet(String url) {
System.out.println();
// 封装post请求参数
StringBody token = new StringBody("c87bcca1f66d6d968e0c318cf89a22e4", ContentType.TEXT_PLAIN);
StringBody cbi_submit = new StringBody("1", ContentType.TEXT_PLAIN);
StringBody tab_network_wan6 = new StringBody("general", ContentType.TEXT_PLAIN);
MultipartEntity reqEntity = new MultipartEntity();
reqEntity.addPart("token", token);
reqEntity.addPart("cbi.submit", cbi_submit);
reqEntity.addPart("tab.network.wan6", tab_network_wan6);
// 创建httpClient实例
CloseableHttpClient httpClient = HttpClients.createDefault();
// 创建httpPost远程连接实例
HttpPost httpPost = new HttpPost(url);
// 配置请求参数实例
RequestConfig requestConfig = RequestConfig.custom().setConnectTimeout(35000)// 设置连接主机服务超时时间
.setConnectionRequestTimeout(35000)// 设置连接请求超时时间
.setSocketTimeout(60000)// 设置读取数据连接超时时间
.build();
// 为httpPost实例设置配置
httpPost.setConfig(requestConfig);
// 设置请求头
httpPost.addHeader("Content-Type", "application/x-www-form-urlencoded");
// 为httpPost设置封装好的请求参数
httpPost.setEntity(reqEntity);
CloseableHttpResponse httpResponse = null;
try {
// httpClient对象执行post请求,并返回响应参数对象
httpResponse = httpClient.execute(httpPost,httpClientContext);
for(Header header:httpResponse.getAllHeaders()){
System.out.println(header.getName()+" : "+header.getValue());
}
System.out.println();
System.out.println("statusCode : "+httpResponse.getStatusLine().getStatusCode());
// 从响应对象中获取响应内容
HttpEntity entity = httpResponse.getEntity();
} catch (ClientProtocolException e) {
e.printStackTrace();
} catch (IOException e) {
e.printStackTrace();
} finally {
// 关闭资源
if (null != httpResponse) {
try {
httpResponse.close();
} catch (IOException e) {
e.printStackTrace();
}
}
if (null != httpClient) {
try {
httpClient.close();
} catch (IOException e) {
e.printStackTrace();
}
}
}
}