curl 知识点
2017年12月19日
curl 默认为 get:
curl localhost:9200
curl 请求其他 method 时:
curl -XPOST localhost:9200
curl -XPUT localhost:9200
curl -XDELETE localhost:9200
curl 带请求 body:
curl -XPOST [url] -d '[body]'
请求头为 JSON 的 body:
curl -XPOST -H "Content-Type: application/json" -d '[body]'