Skip to content

Commit b6c9e7c

Browse files
committed
curl example
1 parent d2cf823 commit b6c9e7c

File tree

1 file changed

+10
-3
lines changed

1 file changed

+10
-3
lines changed

README.md

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,9 @@ Or using [Docker](https://www.docker.com/)
3232
### Address: **`localhost:8000`**
3333

3434
### `GET /api/ping`: Ping
35-
35+
```bash
36+
curl -X GET -i 'http://127.0.0.1:8000/api/ping'
37+
```
3638
- Response:
3739
- 200 OK
3840
```
@@ -41,11 +43,12 @@ Or using [Docker](https://www.docker.com/)
4143
4244
### `POST /api/auth/signup`: Signup
4345
```bash
44-
curl -X POST -i 'http://127.0.0.1:8000/api/auth/signup' -H "Content-Type: application/json" --data '{"username": "c",
46+
curl -X POST -i 'http://127.0.0.1:8000/api/auth/signup' \
47+
-H "Content-Type: application/json" --data '{"username": "c",
4548
"email": "c",
4649
"password": "c" }'
4750
```
48-
51+
4952
- Request body:
5053
```
5154
{
@@ -71,6 +74,10 @@ curl -X POST -i 'http://127.0.0.1:8000/api/auth/signup' -H "Content-Type: applic
7174
```
7275
7376
### `POST /api/auth/login`: Login
77+
```bash
78+
curl -X POST -H 'Content-Type: application/json' -i 'http://127.0.0.1:8000/api/auth/login' \
79+
--data '{"username_or_email":"c", "password":"c"}'
80+
```
7481
- Request body:
7582
```
7683
{

0 commit comments

Comments
 (0)