用curl测试远程HTTP接口

系统部署在远程UNIX上,提供了http,socket接口,在shell下可以使用curl测试:

curl http://10.10.52.17:8788/ESB-initial/sys -d "$(more ../resource/refresh.xml)"

这行命令会把../resource/refresh.xml文件内容用post方式发送到远端url上。

这种方式可以用来做HTTP接口的自动测试。

猜你喜欢

转载自terra.iteye.com/blog/1744799