Http device for XML, JSON devices or web APIs.
Http driver in bOS is used for XML, JSON devices integration or web APIs.
Picture 1: HTTP node
To correctly connect to the integrated device, correct Host URL must be set. If the device requires authentication, fill in the Username and Password. Under Parsing option, select the correct encoding and parsing type, depending on the device integration. For the communication, Command node must be added into bOS. For this test, we add Test under command function.
Again created HTTP device and a Listener device. For regex parsing, parser type is set to Text and under Command setting, set Method Type to GET.
Listener device also needs to have parser setting set to Text. To get the correct response from our HTTP, we need to use the correct Regex command.
Additional information regarding the regex commands can be found:
In this case, we will need to use command: “(?<=GET /)\w+” to get the correct response, in this case the response is''Test ``.
Picture 2: HTTP regex command