Skip to content

Instantly share code, notes, and snippets.

@ceclinux
Created November 8, 2019 12:12
Show Gist options
  • Save ceclinux/41236655c9b6a754fa9e51eb909cee12 to your computer and use it in GitHub Desktop.
Save ceclinux/41236655c9b6a754fa9e51eb909cee12 to your computer and use it in GitHub Desktop.
curl --request POST \
--url http://localhost:8888/users \
--header 'content-type: application/json' \
--data '{
"password": "fefff",
"phone_number":"13161571527"
}'
curl --request GET \
--url http://localhost:8888/users/1 \
--header 'authorization: Token eyJhbGciOiJIUzUxMiIsImlhdCI6MTU3MzEzNTc4MSwiZXhwIjoxNTczMTM2MzgxfQ.eyJpZCI6MX0.RUsydwH658BEeLcfXALNEQVEnj1nqkrIkIai8aIpIc5PKchwJZxX_tgv5UIWkgF_Q12WKsH2UNmMeP5z4IPHYg'
curl --request PATCH \
--url http://localhost:8888/users/34/cart \
--header 'authorization: Token eyJhbGciOiJIUzUxMiIsImlhdCI6MTU3MzIwNDg3OCwiZXhwIjoxNTczMjA1NDc4fQ.eyJpZCI6MzR9.Ureic4Pa1tdhTpfFUOOhJVMOMWfXk9ikcBQ2qsTCGnHFKKswPbZfrLcA_SByS_qVh9LS8fbW4RLInV61ViBbvA' \
--header 'content-type: application/json' \
--data '{
"book_id":2,
"count":3
}'
curl --request POST \
--url http://localhost:8888/users/34/orders \
--header 'authorization: Token eyJhbGciOiJIUzUxMiIsImlhdCI6MTU3MzIwNDM3NiwiZXhwIjoxNTczMjA0OTc2fQ.eyJpZCI6MzR9.6MY4mPZqSdBt2TGEwOigf_qL-cFjiYlyITjCs-AsJJZbdgLYcnWKpEwGctCKwNNJ6lXMJ3J3T1P7j059A5-FUw' \
--header 'content-type: application/json' \
--data '{
"books":[1]
}'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment