如何向服务器发送http put请求?

时间:2014-08-26 04:27:10

标签: http put

我对如何发送HTTP put请求一无所知,但我真的需要这样做,请帮助我

格式为:

PUT / HTTP/1.1
Host: hey.domain.com
Content-type: application/j son
Content-Length: LENGTH
X-name of key-Key: e97d6b85fc85568a63bcfce872caeee028ea5b61
{
"name": "Bruce Wayne",
"email": "bruce@gothamcity.com",
"phone": "+919999888899",
"experienced": false,
"profile": "python"
}

1 个答案:

答案 0 :(得分:0)

使用curl

curl -XPUT -d '{"name": "Bruce Wayne", "email": "bruce@gothamcity.com", "phone": \
    "+919999888899", "experienced": false, "profile": "python" }' \
     -H "Content-Type: application/json" http://hey.domain.com