I've created a JSON server as a temporary backend service to read and edit user data. When I do a read request like this: http://localhost:3001/users?playerId=1193212 The read request is successful and I get the following response:
[
{
"playerId": "1193212",
"partnerId": "506",
"email": "hhristova+qahriprmpaal16@gan.com",
"alias": "qahriprmpaal16",
"forename": "Christine",
"surname": "Bell",
"mobileNumber": "9792694595",
"testAccount": "testAccount",
"suspended": "accountSuspended"
}
]
However, when I do a put request like this:
PUT
http://localhost:3001/users?playerId=1193212
{
"playerId" : "1193212",
"suspended": "accountSuspended"
}
I get a 404 not found response. How do I do a put request with JSON server? I've also tried http://localhost:3001/users/1193212 I'm sending accept and content-type headers = "application/json"