diff --git a/README.md b/README.md index 9bda4c0..4801a5b 100644 --- a/README.md +++ b/README.md @@ -36,11 +36,11 @@ default). It exposes a couple of routes: * the `/fetch` route, which supports `POST` method to send a valid JSON string - defining konnectors to be used in a `params` field. Typical example to send + defining konnectors to be used as the request body. Typical example to send it some content is: ```bash - curl -X POST --data "params=$(cat konnectors.json)" "http://localhost:8080/" + curl -X POST --data "$(cat konnectors.json)" "http://localhost:8080/" ``` where `konnectors.json` is a valid JSON file defining konnectors to be used. Downloaded files will be stored in a temporary directory, and their file URI diff --git a/server.py b/server.py index b3fd757..e50ac1f 100755 --- a/server.py +++ b/server.py @@ -22,7 +22,7 @@ def fetch_view(): """ Fetch from weboob modules. """ - params = request.forms.get("params") + params = request.body.read() return cozyweboob(params)