<aside> đź’ˇ Download flow: (*import instructions)*
</aside>
Starting from the default pipeline.
The classification block outputs a boolean indicating if the inspection is a “pass” or a “fail”. If you want to send that to a rest API, you must first convert that boolean to a JSON dictionary.
You can do that by using the function
block.
Inside the function block, you will add the following code msg.payload = {"pass_fail": msg.payload}
. You can change pass_fail
key to something that would make sense on your REST server.
You can now send the output of the function to the HTTP request
Inside the http request
block you can configure your REST settings
Set Method
to POST
to send data
Set the URL
to the URL you want to send the data to, if you first want to try the functionality locally you can set it to http://localhost:1880/api/post
before setting it to your real URL.
If you want to visualize your post request add the following blocks