summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKeuin <[email protected]>2022-03-28 15:37:23 +0800
committerKeuin <[email protected]>2022-03-28 15:37:23 +0800
commit5d0f08d57372eb3fce7452477c00a34e8425565e (patch)
tree6090e115acd64ce9cca175c51f9485a0ae831efd
parente4694e09978320ec326a73cf9c92e7539cc5890c (diff)
Document HTTP API responses.
-rw-r--r--README.md18
1 files changed, 18 insertions, 0 deletions
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": "<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.