From 458fa90347e28111703a5bdc54dc7ec34be221fb Mon Sep 17 00:00:00 2001 From: JohannesBOT Date: Thu, 28 Aug 2025 11:52:51 +0200 Subject: [PATCH] toString doc --- doc/api.md | 34 +++++++++++++++++++++++++++++++--- 1 file changed, 31 insertions(+), 3 deletions(-) diff --git a/doc/api.md b/doc/api.md index a5ab9fb..c1fad92 100644 --- a/doc/api.md +++ b/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. @@ -45,7 +45,7 @@ POST /sort ``` -## 2️⃣ POST `/isOdd` +## POST `/isOdd` 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. @@ -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` ### Sort an array (Linux/macOS)