My App
Api/Users/Id

Update a user

Update a user

PUT
/api/users/{id}

Path Parameters

idstring
Length3 <= length
idstring
namestring
agenumber

Response Body

curl -X PUT "https://demo.nextshell.dev/api/users/string" \
  -H "Content-Type: application/json" \
  -d '{
    "id": "123",
    "name": "John Doe",
    "age": 42
  }'
const body = JSON.stringify({
  "id": "123",
  "name": "John Doe",
  "age": 42
})

fetch("https://demo.nextshell.dev/api/users/string", {
  body
})
package main

import (
  "fmt"
  "net/http"
  "io/ioutil"
  "strings"
)

func main() {
  url := "https://demo.nextshell.dev/api/users/string"
  body := strings.NewReader(`{
    "id": "123",
    "name": "John Doe",
    "age": 42
  }`)
  req, _ := http.NewRequest("PUT", url, body)
  req.Header.Add("Content-Type", "application/json")
  res, _ := http.DefaultClient.Do(req)
  defer res.Body.Close()
  body, _ := ioutil.ReadAll(res.Body)

  fmt.Println(res)
  fmt.Println(string(body))
}
import requests

url = "https://demo.nextshell.dev/api/users/string"
body = {
  "id": "123",
  "name": "John Doe",
  "age": 42
}
response = requests.request("PUT", url, json = body, headers = {
  "Content-Type": "application/json"
})

print(response.text)
{
  "id": "123",
  "name": "John Doe",
  "age": 42
}