curl --include --request POST --header "Content-Type: application/json" -d '{
"credentials": {
"email": "[email protected]",
"password": "an example password",
"password_confirmation": "an example password"
}
}' http://localhost:3000/register
curl --request POST --header "Content-Type: application/json" -d '{
"credentials": {
"email": "[email protected]",
"password": "an example password"
}
}' http://localhost:3000/login
curl --request DELETE --header "Authorization: Token token=c017d611187e3350baffc52d35a4df69" http://localhost:3000/logout/1
curl --header "Authorization: Token token=c017d611187e3350baffc52d35a4df69" http://localhost:3000/users
curl --header "Authorization: Token token=c017d611187e3350baffc52d35a4df69" http://localhost:3000/users
OR
curl http://localhost:3000/users
curl --request POST --header "Authorization: Token token=be249dc0231396806f24c953cafae03a" --header "Content-Type: application/json" -d '{
"book": {
"title":"The Hold",
"isbn":"abc123def456"
}
}' http://localhost:3000/books