Skip to content

Commit 0a4dfae

Browse files
committed
update Readme.md file
1 parent c73978e commit 0a4dfae

File tree

1 file changed

+54
-20
lines changed

1 file changed

+54
-20
lines changed

readme.md

Lines changed: 54 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,38 +1,72 @@
11
# CURL commands for testing api
22

3-
## User Registration
4-
5-
curl --location --request POST 'http://localhost:8787/api/v1/user/save' \
3+
4+
## User Save
5+
6+
curl --location --request GET 'http://localhost:8585/api/v1/user/3' \
67
--header 'Content-Type: application/json' \
78
--data-raw '{
8-
"id" : 1,
9-
"userId" : "mehedi01",
10-
"password" : "123",
11-
"mobile" : "01835233447"
9+
"name":"mehedi",
10+
"email":"mehedi@gmail.com",
11+
"mobile":"01621640037",
12+
"gender":"male",
13+
"age":29,
14+
"nationality":"Bangladeshi"
1215
}'
1316

14-
## User Login
15-
16-
curl --location --request POST 'http://localhost:8787/api/v1/login' \
17+
## User check by userId
18+
19+
curl --location --request GET 'http://localhost:8585/api/v1/user/1' \
1720
--header 'Content-Type: application/json' \
1821
--data-raw '{
19-
"userId" : "mehedi01",
20-
"password" : "123"
22+
"name":"mehedi",
23+
"email":"mehedi@gmail.com",
24+
"mobile":"01621640037",
25+
"gender":"male",
26+
"age":29,
27+
"nationality":"Bangladeshi"
2128
}'
22-
23-
## User UserId Check
2429

25-
curl --location --request POST 'http://localhost:8787/api/v1/user/forgetPass' \
30+
31+
## User validation
32+
33+
curl --location --request POST 'http://localhost:8585/api/v1/user' \
2634
--header 'Content-Type: application/json' \
2735
--data-raw '{
28-
"userId" : "mehedi01"
36+
"name":null,
37+
"email":"mehedigmail.com",
38+
"mobile":"0161640037",
39+
"gender":"male",
40+
"age":19,
41+
"nationality":""
2942
}'
3043

31-
## Reset Password
44+
## Output
45+
46+
{
47+
"nationality": "must not be blank",
48+
"name": "Name shouldn't be null",
49+
"mobile": "mobile number should be valid",
50+
"age": "must be greater than or equal to 20",
51+
"email": "Email should be valid"
52+
}
53+
3254

33-
curl --location --request POST 'http://localhost:8787/api/v1/user/reset' \
55+
## Exception Handle
56+
57+
curl --location --request GET 'http://localhost:8585/api/v1/user/3' \
3458
--header 'Content-Type: application/json' \
3559
--data-raw '{
36-
"userId" : "mehedi01",
37-
"password" : "123"
60+
"name":null,
61+
"email":"mehedigmail.com",
62+
"mobile":"0161640037",
63+
"gender":"male",
64+
"age":19,
65+
"nationality":""
3866
}'
67+
68+
## Output
69+
70+
{
71+
"errorMessage": "User not found with this UserId : 3"
72+
}

0 commit comments

Comments
 (0)