美文网首页
curl 访问接口实例

curl 访问接口实例

作者: marksdev | 来源:发表于2018-02-01 11:26 被阅读0次

    curl -s -H "Content-Type: application/json" -X POST -d '{"name":"jessy","age":"3","type":"siamese"}' http://localhost:3000/cat | json

    curl -s -H "Content-Type: application/json" -X POST -d '{"name":"sam","age":"5","type":"alley"}' http://localhost:3000/cat | json

    curl -s -X GET http://localhost:3000/cat | json

    curl -s -H "Content-Type: application/json" -X PUT -d '{"name":"sam","age":"8","type":"alley"}' http://localhost:3000/cat/sam | json

    curl -s -X DELETE http://localhost:3000/cat/sam | json

    相关文章

      网友评论

          本文标题:curl 访问接口实例

          本文链接:https://www.haomeiwen.com/subject/tvqdzxtx.html