Use POST keyword rather than GET for stdin conversation /fetch route

This commit is contained in:
Lucas Verney 2016-10-07 09:52:05 -04:00
parent a5c9039fee
commit 2263d8c724
2 changed files with 2 additions and 2 deletions

View File

@ -64,7 +64,7 @@ integrate it with Node modules using
Then, you can write on `stdin` and fetch the responses from `stdout`. Then, you can write on `stdin` and fetch the responses from `stdout`.
Available commands are: Available commands are:
* `GET /list` to list all available modules. * `GET /list` to list all available modules.
* `GET /fetch JSON_PARAMS` where `JSON_PARAMS` is an input JSON for module * `POST /fetch JSON_PARAMS` where `JSON_PARAMS` is an input JSON for module
parameters. parameters.
* `exit` to quit the script and end the conversation. * `exit` to quit the script and end the conversation.

View File

@ -48,7 +48,7 @@ def process_query(query):
# List modules view # List modules view
logger.info("Calling /list view.") logger.info("Calling /list view.")
return list_view() return list_view()
elif query.startswith("GET /fetch"): elif query.startswith("POST /fetch"):
# Fetch modules view # Fetch modules view
logger.info("Calling /list view.") logger.info("Calling /list view.")
params = query.split()[2] params = query.split()[2]