aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Duncan <pabs@pablotron.org>2025-03-08 00:58:32 -0500
committerPaul Duncan <pabs@pablotron.org>2025-03-08 00:58:32 -0500
commit11d6d0d637c12be4f7307e65e2fa496d1777cadc (patch)
tree65326ab779e4d92ac80a2e5fd3d4a82e9ddde4e8
parent1bad38cc81f75c90f7192989207ffd7316709ef9 (diff)
downloadjim-bot-11d6d0d637c12be4f7307e65e2fa496d1777cadc.tar.xz
jim-bot-11d6d0d637c12be4f7307e65e2fa496d1777cadc.zip
README.md: document JSON "API"HEADmain
-rw-r--r--README.md12
1 files changed, 12 insertions, 0 deletions
diff --git a/README.md b/README.md
index 834e9ca..0998e74 100644
--- a/README.md
+++ b/README.md
@@ -22,6 +22,16 @@ Build and run container using [Podman][]:
Then open <http://localhost:8080/> in your browser.
+By default the sentences are returned as plain text delimited by
+newlines. If the request method is POST and the `Accept` header is set
+to `application/json`, then the sentences are returned as a
+[JSON][]-encoded array.
+
+Example:
+
+ $ curl -X POST -H 'accept: application/json' http://localhost:8080/
+ ["uniquely myocardinate communities",...
+
## Build
To build locally (requires [Go][]):
@@ -54,3 +64,5 @@ Note: The `check` target requires [staticcheck][].
"Go programming language"
[staticcheck]: https://staticcheck.dev/docs/
"Go static analyzer."
+[json]: https://json.org/
+ "JavaScript Object Notation"