How to do HTTP Request

In Progress

Comments

9 comments

  • Avatar
    Jaemyn Kinney

    Have you tested with a soft trigger first?

    I see the camera is showing offline so you may be hitting unrelated issues.

    Otherwise maybe get the generated cURL from postman for us to look at?

    0
    Comment actions Permalink
  • Avatar
    Paawan Aggarwal

    Yes, I have tested the HTTP request with a soft trigger also but it did not show any notification. The camera is showing offline because I was not connected to the camera at that time but when I was testing it the camera was connected with me.

     

    0
    Comment actions Permalink
  • Avatar
    Paawan Aggarwal

    curl --location 'http://127.0.0.1:5000/event_trigger' \
    --header 'Content-Type: text/plain' \
    --data 'heyy'

     

    @Jaemyn Kinney  cURL of the postman

    0
    Comment actions Permalink
  • Avatar
    Andrey Terentyev

    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.

     

    0
    Comment actions Permalink
  • Avatar
    Paawan Aggarwal

    I want to ask how can we create the HTTP request using the windows. 

    0
    Comment actions Permalink
  • Avatar
    Jaemyn Kinney

    When you tested:

    • Was postman on the same machine that was running the service you were connecting to?
    • Was NX on the same machine. This could be a simple firewall issue.
    • From the NX server you could run a test net from powershell.
    0
    Comment actions Permalink
  • Avatar
    Paawan Aggarwal

    Yes the postman and NX are on the same machine

     

    0
    Comment actions Permalink
  • Avatar
    Jaemyn Kinney

    Tried using a non loopback IP of your host?

    So are you running a closed single PC environment?
    If not, double check the machine with the NX Server can reach the PC with the python server.

    Can you get a Get request working?

    0
    Comment actions Permalink
  • Avatar
    Jaemyn Kinney

    Hey Paawan, did that work?

    0
    Comment actions Permalink

Please sign in to leave a comment.