toString doc
This commit is contained in:
34
doc/api.md
34
doc/api.md
@@ -15,7 +15,7 @@ Content-Type: application/json
|
|||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
## 1️⃣ POST `/sort`
|
## POST `/sort`
|
||||||
|
|
||||||
Sorts an array (numeric or alphabetical) and returns the sorted array.
|
Sorts an array (numeric or alphabetical) and returns the sorted array.
|
||||||
|
|
||||||
@@ -45,7 +45,7 @@ POST /sort
|
|||||||
```
|
```
|
||||||
|
|
||||||
|
|
||||||
## 2️⃣ POST `/isOdd`
|
## POST `/isOdd`
|
||||||
|
|
||||||
Checks if a given number is odd.
|
Checks if a given number is odd.
|
||||||
|
|
||||||
@@ -75,7 +75,7 @@ POST /isOdd
|
|||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
## 3️⃣ POST `/isEven`
|
## POST `/isEven`
|
||||||
|
|
||||||
Checks if a given number is even.
|
Checks if a given number is even.
|
||||||
|
|
||||||
@@ -103,6 +103,34 @@ POST /isEven
|
|||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
## POST `/toString`
|
||||||
|
|
||||||
|
calls .toString()
|
||||||
|
|
||||||
|
### Request
|
||||||
|
|
||||||
|
**URL:**
|
||||||
|
|
||||||
|
```
|
||||||
|
POST /toString
|
||||||
|
```
|
||||||
|
|
||||||
|
**Body Example:**
|
||||||
|
|
||||||
|
```json
|
||||||
|
{
|
||||||
|
"number": 7
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
### Successful Response
|
||||||
|
|
||||||
|
```json
|
||||||
|
{
|
||||||
|
"ret": "7"
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
## 📌 Example Usage with `curl`
|
## 📌 Example Usage with `curl`
|
||||||
|
|
||||||
### Sort an array (Linux/macOS)
|
### Sort an array (Linux/macOS)
|
||||||
|
|||||||
Reference in New Issue
Block a user