[記錄]curl命令筆記

古辛發表於2020-11-20

1、普通介面呼叫

curl -H ‘Content-Type:application/json; charset=utf8’ -X POST http://10.10.10.22:8088/api/test

2、測試介面響應時間

curl  -w "time_connect: %{time_connect}\ntime_starttransfer: %{time_starttransfer}\ntime_total: %{time_total}\n" -d "username=ea24943b&password=a9b68e8&time=1601446518495&sign=55ba1bee62c7a670500ca5cca18c9" -X POST http://10.10.10.22:8088/api/login

 

3、測試WebSocket

curl --no-buffer -v \

     -H 'Connection: keep-alive, Upgrade' \

     -H 'Upgrade: websocket' \

     -H 'Sec-WebSocket-Version: 13' \

     -H 'Sec-WebSocket-Key: websocket' \

     http://10.10.10.22:8088/ws/event ws | od -t c

 

 

 

 

 

 

相關文章