使用curl命令模拟发送post-data格式数据
使用curl命令发送POST请求并模拟发送post-data格式数据,可以使用以下命令:
curl -X POST -d 'key1=value1&key2=value2' URL
其中,-X POST表示发送POST请求,-d表示要发送的数据,URL为目标URL。
示例:
curl -X POST -d 'username=admin&password=123456' http://example.com/login
这个例子中,将发送一个POST请求到http://example.com/login,并且发送的数据为username=admin&password=123456。
原文地址: https://www.cveoy.top/t/topic/iGXr 著作权归作者所有。请勿转载和采集!