From 04cbde0fdad5752afb7c507e25e566301467de9d Mon Sep 17 00:00:00 2001 From: Bryson-Mmari Date: Wed, 3 Sep 2025 16:46:30 +0300 Subject: [PATCH] Tueingia kwenye server --- src/api.req.http | 27 +++++++++++++++++++++++++++ src/api.request.http | 18 +++++++++++++++++- 2 files changed, 44 insertions(+), 1 deletion(-) create mode 100644 src/api.req.http diff --git a/src/api.req.http b/src/api.req.http new file mode 100644 index 0000000..3ec0cfd --- /dev/null +++ b/src/api.req.http @@ -0,0 +1,27 @@ +GET http://localhost:3000/api/product + +POST http://localhost:3000/user +Content-Type: application/json + +{ + "username": "bryTheOwner", + "password": "bry@123" +} + +POST http://localhost:3000/signin +Content-Type: application/json + +{ + "username": "bryTheOwner", + "password": "bry@123" +} + +POST http://localhost:3000/api/product +Content-Type: application/json + +{ + "name": "Sample Product", + "description": "This is a sample product description.", + "price": 29.99, + "category": "Sample Category" +} \ No newline at end of file diff --git a/src/api.request.http b/src/api.request.http index 470d5b4..199a328 100644 --- a/src/api.request.http +++ b/src/api.request.http @@ -1 +1,17 @@ -GET http://localhost:3000 \ No newline at end of file +GET http://localhost:3000/api/product + +POST http://localhost:3000/user +Content-Type: application/json + +{ + "username": "bry", + "password": "bry@2030" +} + +POST http://localhost:3000/user/signin +Content-Type: application/json + +{ + "username": "john", + "password": "securepassword123" +} \ No newline at end of file