13
打印時的響應內容主體:使用curl後我用下面的命令在Ubuntu上數據
curl -v -H "Accept: application/json" -H "Content-type: application/json" -X POST -d '{"foo":"bar"}' http://localhost:8888/
以下是收到的響應:
< HTTP/1.1 200 OK
< Content-Length: 3
< Content-Type: text/html; charset=UTF-8
< Server: TornadoServer/2.1
<
* Connection #0 to host localhost left intact
* Closing connection #0
所以我的問題是;如何使用curl發佈並打印響應內容主體?
終於來了!只需設置「接受」標題就可以做到...... – AlonL
^取決於另一端的服務。 –