From 5d0f08d57372eb3fce7452477c00a34e8425565e Mon Sep 17 00:00:00 2001 From: Keuin Date: Mon, 28 Mar 2022 15:37:23 +0800 Subject: Document HTTP API responses. --- README.md | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/README.md b/README.md index 5333922..45ba157 100644 --- a/README.md +++ b/README.md @@ -24,6 +24,23 @@ by WeChat's poor functionality. "message": "" } ``` +- Response: + + Status Code: 200 (If the request is a valid JSON POST) + + Body: + - Success: + ```json + { + "success": true, + "message": "" + } + ``` + - Fail: + ```json + { + "success": false, + "message": "Invalid token." + } + ``` ### Using GET (Depreciated, kept for backward compatibility) @@ -32,6 +49,7 @@ by WeChat's poor functionality. - Url Parameters: + `token`: Your token + `message`: Text message +- Response: Same to POST requests Note: To prevent potential cache on the network, add a nonce parameter (such as a timestamp) if necessary. -- cgit v1.2.3