-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathrequest.http
53 lines (38 loc) · 2.09 KB
/
request.http
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
### api request for register and unregister user to check available books
GET http://localhost:8000/view/books
Content-Type: application/x-www-form-urlencoded
### api request for users to create account
POST http://localhost:8000/create/account
Content-Type: application/x-www-form-urlencoded
first_name=Yusuf&last_name=Akinleye&email=yusufakinleye10@gmail.com&password=Akinleye12345
### request for users to authenticate and authorize user to gain full access to other api request
POST http://localhost:8000/#/account
Content-Type: application/x-www-form-urlencoded
email=yusufakinleye10@gmail.com&password=Akinleye12345
### api request for users to search for book of their choice
POST http://localhost:8000/api/user/search-book
Content-Type: application/x-www-form-urlencoded
title=Think Big
### request to process payment for a book
POST http://localhost:8000/api/user/pay/details
Content-Type: application/x-www-form-urlencoded
first_name=Yusuf&last_name=Akinleye&email=yusufakinleye140@gmail.com&amount=10000&phone=09068849124&card_no=5531886652142950&cvv=564&expiry_month=09&expiry_year=2032&pin=3310
### request to validate book payment
GET http://localhost:8000/api/user/pay/validate
Content-Type: application/x-www-form-urlencoded
### request to add book paid for in the user library
GET http://localhost:8000/add/new/book
Content-Type: application/x-www-form-urlencoded
### request to allow authorized user to view the main library
GET http://localhost:8000/api/user/view/library
Content-Type: application/x-www-form-urlencoded
### request to allow authorized user to view user the book userlibrary/collection
GET http://localhost:8000/api/user/view/books
Content-Type: application/x-www-form-urlencoded
### request to search for book in the user library (copy the id to test the endpoint)
GET http://localhost:8000/api/user/search/book/639f02e4af11f63bde22f6c5
Content-Type: application/x-www-form-urlencoded
### request to delete from the user library (copy the id to test the endpoint)
GET http://localhost:8000639f02e4af11f63bde22f6c5
Content-Type: application/x-www-form-urlencoded
/api/user/delete/book/