summaryrefslogtreecommitdiff
path: root/lambda-calcul/rust/README.md
diff options
context:
space:
mode:
Diffstat (limited to 'lambda-calcul/rust/README.md')
-rw-r--r--lambda-calcul/rust/README.md8
1 files changed, 7 insertions, 1 deletions
diff --git a/lambda-calcul/rust/README.md b/lambda-calcul/rust/README.md
index 0b13e5c..08dfc3d 100644
--- a/lambda-calcul/rust/README.md
+++ b/lambda-calcul/rust/README.md
@@ -26,9 +26,14 @@ We use the following variables to represent, well, variable elements that should
The client needs to send a `POST /register` request, passing in as payload a JSON object with a `url` and `name` string fields:
```
-curl -v -X POST -d '{"url":"${CLIENT_URL}", "name": "toto"}' -H 'Content-type: application/json' ${SERVER_BASE_URL}/register
+curl -v -X POST -d '{"url":"${CLIENT_URL}", "name": "toto", "encoding": "Json"}' -H 'Content-type: application/json' ${SERVER_BASE_URL}/register
```
+The payload is expected to be a JSON object with the following fields:
+* `url`: The client URL for the server to callback and send expressions to evaluate
+* `name`: The name of this client
+* _(Optional)_ `encoding`: Which encoding to use to receive expressions and send responses. One of `Json` or `Sexp`, defaulting to `Json`.
+
Notes:
* Obviously, client needs to start a HTTP server able to respond to a `GET` request at the given URL. To check or troubleshoot connectivity, one can use the [netcat](https://linux.die.net/man/1/nc) program to fire up a local server with `nc -l 12345` and use the ip and port to register the client. This will echo in the terminal whatever the _server_ sends
@@ -74,6 +79,7 @@ There are `--port` and `--host` arguments should one want to change the default
* [ ] persist user state to avoid losing connections
* [ ] deploy automatically server on punkachien.net with radicle CI
* [ ] better JSON representation for AST than raw serde stuff
+* [ ] Document JSON format...
* [ ] ask people to implement something
* [ ] prepare starter kit to overcome