Skip to content

Instantly share code, notes, and snippets.

@gronnbeck
Created August 16, 2012 09:24
Show Gist options
  • Save gronnbeck/3368713 to your computer and use it in GitHub Desktop.
Save gronnbeck/3368713 to your computer and use it in GitHub Desktop.
➜ ~ curl -c /tmp/hoopla -b /tmp/hoopla -D- -X PATCH $DEV_API_URL/organizations/1141995721/users -d '{"user_id": 4050666423, "data": null, "is_admin": true }'
HTTP/1.1 405 Method Not Allowed
Content-Length: 131
Content-Type: application/json; charset=utf-8
Server: cyclone/1.0-rc10
{
"msg": "specify user_id to update. use POST without user_id to add new member",
"ok": false,
"error": "BadMethod"
}%
➜ ~ curl -c /tmp/hoopla -b /tmp/hoopla -D- -X POST $DEV_API_URL/organizations/1141995721/users -d '{"data": null, "is_admin": true }'
HTTP/1.1 400 Bad Request
Content-Length: 189
Content-Type: application/json; charset=utf-8
Server: cyclone/1.0-rc10
{
"msg": "invalid input",
"ok": false,
"detail": {
"organization_id": "The input is not valid",
"user_id": "Missing value"
},
"error": "BadRequest"
}%
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment