Skip to content

Commit 19aaa2a

Browse files
Update README.md
1 parent 810dda4 commit 19aaa2a

File tree

1 file changed

+71
-1
lines changed

1 file changed

+71
-1
lines changed

README.md

Lines changed: 71 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,5 +52,75 @@ Simple springboot API for addressBook. Supports all REST controllers and have cu
5252
## Updates
5353
* To be added
5454

55-
## API supports all REST mappings (GET, POST, PUT, DELETE)
55+
# API supports all REST mappings (GET, POST, PUT, DELETE)
56+
All of these requests made in these screenshot are from remote database with about 200ms ping, so response is slow.
5657
### GET requests
58+
* Get all records saved in the addressBook.
59+
```
60+
localhost:7090/api/getAll
61+
```
62+
63+
![image](https://user-images.githubusercontent.com/6762915/150171183-4eeb3bda-9d9a-4910-89c2-7f798faf2280.png)
64+
65+
* Get By ID or EmailAddress (Both are Unique field)
66+
```
67+
localhost:7090/api/get/{parameter}
68+
```
69+
70+
![gif](http://200.showy.life:6969/rc6hArgBmZ.gif)
71+
72+
### POST requests (with error handling)
73+
* Add single record
74+
```
75+
localhost:7090/api/
76+
77+
{
78+
"firstName" : "firstName",
79+
"lastName" : "lastName",
80+
"email" : "valid@email",
81+
"address" : "Any address???",
82+
"phoneNo" : "000000000"
83+
}
84+
```
85+
86+
87+
![image](http://200.showy.life:6969/ZqSSbctdEV.gif)
88+
89+
* Add multiple records
90+
```
91+
localhost:7090/api/saveAll
92+
[
93+
{
94+
"firstName" : "firstName",
95+
"lastName" : "lastName",
96+
"email" : "valid@email",
97+
"address" : "Any address???",
98+
"phoneNo" : "000000000"
99+
},
100+
101+
{
102+
"firstName" : "firstName",
103+
"lastName" : "lastName",
104+
"email" : "valid@email",
105+
"address" : "Any address???",
106+
"phoneNo" : "000000000"
107+
}
108+
109+
]
110+
```
111+
112+
![image](http://200.showy.life:6969/IgHAfj31NE.gif)
113+
114+
115+
### DELETE requests (Support delete by either id or email)
116+
```
117+
localhost:7090/api/
118+
```
119+
![image](http://200.showy.life:6969/nIFHIq7bVM.gif)
120+
121+
### PUT requests (need id or email to not be null)
122+
```
123+
localhost:7090/api/
124+
```
125+
126+
![image](http://200.showy.life:6969/0PSIsehkdY.gif)

0 commit comments

Comments
 (0)