fofx-web
v1.0.1
Published
An input/output plugin for HTTP requests for [fofx](https://github.com/functzia/fofx)
Downloads
5
Readme
fofx-web
An input/output plugin for HTTP requests for fofx
- type:
"web"
- params (these go in your plugins.json):
- port [int] this is the port your server listens on (default: 9999)
- input params (these go in your nano.json input key):
- endpoint [string] this will trigger on a request to http://localhost:<port>/api/<endpoint>
- response [bool] should the nano's return value be forwarded as the request's response.
- output params (these go in your nano.json output key):
- url [string] send an HTTP request to this url when your nano is done.
- method [GET|POST] Specify GET or POST method for the request. If using POST, the nano's return value is used as the request's JSON body.
Sample plugins.json
[
{
"name": "fofx-web",
"params": {
"port": 5000
}
}
]
Sample nano.json
{
"input": {
"type": "web",
"endpoint": "foo",
"response": true
},
"output": {
"type": "web",
"method": "POST",
"url": "http://localhost:5000/api/bar"
}
}