我是 ANT 新手,我需要一种方法将 HTTP GET 请求的输出读取到属性中,以便稍后在构建脚本中使用它。
我尝试使用https://ant.apache.org/manual/Tasks/get.html但发现没有可用的参数。我正在使用 ant 1.9.6 和最新的 ant contrib 版本
谢谢!
最佳答案
使用<loadresource>具有嵌套的任务 <url>资源:
<loadresource property="content">
<url url="https://google.com"/>
</loadresource>
关于java - 从 HTTP GET 请求的响应中设置 ANT 属性,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/56990648/