From e85bf4b057db5d1d22861bd78caf5879e6f7f662 Mon Sep 17 00:00:00 2001 From: "francois.baille" Date: Sun, 4 May 2025 05:53:01 +0200 Subject: [PATCH] Ajouter Exemples CURL --- Exemples-CURL.md | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 Exemples-CURL.md diff --git a/Exemples-CURL.md b/Exemples-CURL.md new file mode 100644 index 0000000..19c6551 --- /dev/null +++ b/Exemples-CURL.md @@ -0,0 +1,13 @@ +# Authentification +curl -X POST https://148.113.194.48:8000/auth/login \ + -H "Content-Type: application/json" \ + -d '{"email":"user@test.com","password":"secret"}' + +# Récupérer les événements +curl -X GET https://148.113.194.48:8000/events \ + -H "Authorization: Bearer VOTRE_JWT" + +# Créer un utilisateur (admin) +curl -X POST https://148.113.194.48:8000/users \ + -H "Authorization: Bearer ADMIN_JWT" \ + -d '{"username":"new","email":"new@test.com","password":"pass","role":"user"}' \ No newline at end of file