Last active
December 30, 2025 18:40
-
-
Save SoupleCodes/2d723968979e03944becfac863d0626a to your computer and use it in GitHub Desktop.
Curl + Fetch Requests for Blaggger (Documentation)
This file contains hidden or 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
| Registering an account: | |
| Curl: | |
| curl -X POST \ | |
| http://localhost:8787/register \ | |
| -H 'Content-Type: application/json' \ | |
| -d '{ | |
| "username": "souple", | |
| "password": "souple100" | |
| }' | |
| eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VyIjoic291cGxlIiwiaWQiOjEsInJvbGUiOiJ1c2VyIiwiZXhwIjoxNzY3MjA1NDg0fQ.N_ShDc0R5_nQVoTmI0KXAXLHyzFDgQAu6Byojgpg0MI" | |
| curl -X POST \ | |
| http://localhost:8787/login \ | |
| -H 'Content-Type: application/json' \ | |
| -d '{ | |
| "username": "souple", | |
| "password": "souple100" | |
| }' | |
| curl -X POST \ | |
| http://localhost:8787/loggedin \ | |
| -H 'Content-Type: application/json' \ | |
| -H "Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VyIjoic291cGxlIiwiaWQiOjEsInJvbGUiOiJ1c2VyIiwiZXhwIjoxNzY3MjA2MzM2fQ.Gq0z0z-cO0oxvcp2VAXi3xNThV-xwud7oJJ9RaVj-Rc" | |
| curl -X PATCH \ | |
| http://localhost:8787/logout \ | |
| -H 'Content-Type: application/json' \ | |
| -H "Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VyIjoic291cGxlIiwiaWQiOjEsInJvbGUiOiJ1c2VyIiwiZXhwIjoxNzY3MjA2MzM2fQ.Gq0z0z-cO0oxvcp2VAXi3xNThV-xwud7oJJ9RaVj-Rc" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment