首页 > 解决方案 > 如何使用 curl 获取数据

问题描述

我有一个页面,我需要提交一个号码,然后我从那个号码中获取数据

页面就像:http://page/

并在提交表单请求 URL 更改为:http://page/services/getData

但方法类似于:

http://page/services/getData?method=search&1234

有人可以帮助我使用 curl 提取 http://page/services/getData?method=search&1234 中显示的数据吗?

我已经尝试过: curl -v -H "Content-Type: application/json" -X POST \ -d http://page/services/getData?method=search&1234 curl -o http://page/services/ getData?method=search&1234 curl --data http://page/services/getData?method=search&1234

标签: httpcurlposthttp-headershttp-post

解决方案


我一直在寻找几个小时,但我刚刚发布了这个问题,我得到了我想要的:

curl --request GET --url 'http://page/services/getData?method=search&1234'


推荐阅读