Created
January 8, 2022 09:11
-
-
Save skolhustick/66df5be459a65e5a82df4d07f33769ec to your computer and use it in GitHub Desktop.
next-js-prisma-orm-mongodb-curl-tests.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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": "[email protected]", | |
"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