有时候,想要监测eclipse中发送get获取post请求,一样可以使用代理方式:
1、eclipse代码设置
代码中添加,可以就写在主函数中,然后再调用请求函数。
system.setproperty(http.proxyset, true);
system.setproperty(http.proxyhost, 127.0.0.1);
system.setproperty(http.proxyport, 8885);
或者eclipse 中设置
windows > preferences > java > installed jres
选中installed jres > edit > 设置default vm arguments:-dhttp.proxyset=true -dhttp.proxyhost=127.0.0.1 -dhttp.proxyport=8888
2、charles设置
再设置charles 中的代理,端口必须保持一致,就可以抓取eclipse中运行的请求。
