Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save skolhustick/66df5be459a65e5a82df4d07f33769ec to your computer and use it in GitHub Desktop.
Save skolhustick/66df5be459a65e5a82df4d07f33769ec to your computer and use it in GitHub Desktop.
next-js-prisma-orm-mongodb-curl-tests.sh
curl - request GET \
 - url http://localhost:3000/api/users
curl - request POST \
 - url http://localhost:3000/api/users \
 - header 'Content-Type: application/json' \
 - data '{
 "name": "Bill Gates",
 "email": "bill@microsoft.com",
 "birthYear": 1955
}'
# Replace with your ids
curl - request PUT \
 - url http://localhost:3000/api/users \
 - header 'Content-Type: application/json' \
 - data '{
 "id": "61d939b9c59d62ff649be930",
 "name": "Bill Murray"
}'
curl - request DELETE \
 - url http://localhost:3000/api/users \
 - header 'Content-Type: application/json' \
 - data '{
 "id": "61d939b9c59d62ff649be930"
}'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment