Search code examples
httpput

how to send a http put request to the server?


i don't know anything about how to send HTTP put request but i really needed to do this please help me

here is the format :

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"
}

Solution

  • Use 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