Skip to content

Latest commit

 

History

History
31 lines (23 loc) · 809 Bytes

CURL.md

File metadata and controls

31 lines (23 loc) · 809 Bytes

create users

curl -d '{ "name": "Randell Kovalsky", "mail": "rk@foo.b", "pass": "asd123"}' localhost:8080/users -v
curl -d '{ "name": "Wanita Humerick", "mail": "wh@foo.b", "pass": "asd123"}' localhost:8080/users -v
curl -d '{ "name": "Norman Tuner", "mail": "nt@foo.b", "pass": "asd123"}' localhost:8080/users -v

create session

curl -d '{ "mail": "wh@foo.b", "pass": "asd123"}' localhost:8080/sessions -v

users list

curl -H "x-session: <session_uid>" localhost:8080/users -v

users filter

# starts with name 'Rand'
curl -H "x-session: <session_uid>" localhost:8080/users?filter=name,sw,Rand -v

edit user

curl -X PUT -H "x-session: <session_uid>" -d '{ "name": "Joana Dark"}' localhost:8080/users?uid=<target_user_uid> -v