Jump to content

Curl to Network Resource translation


atmarosi
Go to solution Solved by whywork,

Recommended Posts

Did some searching but couldn't find anything of the sort - so here we are...

Got a Digital Logger's DIN Relay 4, trying to leverage Network Resources to trigger REST API call on said DIN Relay 4.  Using Curl on test box on the same network I'm able to have a relay fire, but can't figure out how to chop up the curl command into something for Network Resources to consume...Any ideas?

Working curl:

curl --digest -u admin:admin -X PUT -H "X-CSRF: x" --data "value=true" "http://10.10.10.10/restapi/relay/outlets/2/state/"

Thanks in advanced!

 

Link to comment
  • Solution

Hi

I dont have Din Relay but do have Digital loggers web powerswitch

Here is the network resource i use to turn on outlet 3

GET /outlet?3=ON HTTP/1.1
Host: 192.168.1.174:8074
User-Agent: Mozilla/4.0
Connection: Close
Content-Type: application/x-www-form-urlencoded
Authorization: Basic (password is requested, then saved when setting up network resource)
 

Link to comment
Guest
This topic is now closed to further replies.

  • Recently Browsing

    • No registered users viewing this page.
  • Who's Online (See full list)

    • There are no registered users currently online
  • Forum Statistics

    • Total Topics
      36.5k
    • Total Posts
      367.6k
×
×
  • Create New...