How to do HTTP Request
In ProgressWe have created our Python web server on localhost and in that server, we are using the action "DoHTTP(S) Request" and the HTTP(S) URL is "http://127.0.01:5000/event_trigger" using "motion on camera" at "start" and the interval of action is "instant" but are not getting any response on the Python web server from NX Witness. We are using content-type "text/plain" and the request method is "Post". We have also confirmed that the Web server is working fine using the "Potman app". So can you tell us what we are doing wrong in it or how we can use the http request?
-
curl --location 'http://127.0.0.1:5000/event_trigger' \
--header 'Content-Type: text/plain' \
--data 'heyy'@Jaemyn Kinney cURL of the postman
-
Hello,
Let's make the test stupid simple. Please follow the instructions below. Those worked just fine for me in my Linux machine. Please use the tescamera for emulating a camera device. The testcamera binary is located in the mediaserver binary direcory. In Linux, it's /opt/networkoptix/mediaserver/bin/testcamera
1. Create a simple TCP server with the netcat utility. Type in the terminal window
nc -l 5000
2. Create a Soft Trigger rule in the GUI like this.
3. Open the camera on the scene. And click the soft trigger icon.
4. See the output in the terminal window. Here is mine.
Please, share a screencast with your process and resulting output.
Please provide the build number of the Server.
Please sign in to leave a comment.
Comments
9 comments