charles 抓取eclipse中的请求
Posted 此岸花开
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了charles 抓取eclipse中的请求相关的知识,希望对你有一定的参考价值。
charles抓取eclipse中的请求
有时候,想要监测eclipse中发送get获取post请求,一样可以使用代理方式:
代码中添加,可以就写在主函数中,然后再调用请求函数。
System.setProperty("http.proxySet", "true");
System.setProperty("http.proxyHost", "127.0.0.1");
System.setProperty("http.proxyPort", "8888");
或者eclipse 中设置
Windows > preferences > java > installed jres
选中installed jres > edit > 设置Default VM arguments:-Dhttp.proxySet="true" -Dhttp.proxyHost="127.0.0.1" -Dhttp.proxyPort="8888"
再设置charles 中的代理,端口必须保持一致,就可以抓取eclipse中运行的请求。
以上是关于charles 抓取eclipse中的请求的主要内容,如果未能解决你的问题,请参考以下文章