First time web hook

Ok so i have this web forum

This is what the web hook generated for me

void loop() {
  // Get some data
  String data = String(10);
  // Trigger the integration
  Particle.publish("Irrigation", data, PRIVATE);
  // Wait 60 seconds
  delay(60000);
}
      
-----------------------------------------

void setup() {
  // Subscribe to the integration response event
  Particle.subscribe("hook-response/Irrigation", myHandler, MY_DEVICES);
}

void myHandler(const char *event, const char *data) {
  // Handle the integration response
}

how do i get the values from the forum to use in my code as a variable?
For some reason i cant rap my head around this one HELP

UPDATE:
Response
The HTTP response received from the webhook url

HTTP/1.1 200 OK
Date: Thu, 17 Dec 2020 21:28:50 GMT
Server: nginx/1.19.5
Content-Type: text/html; charset=UTF-8
Cache-Control: max-age=300
Expires: Thu, 17 Dec 2020 21:33:50 GMT
Vary: Accept-Encoding
X-Endurance-Cache-Level: 2
X-Server-Cache: true
X-Proxy-Cache: MISS
Transfer-Encoding: chunked

Submit

Request
The HTTP request sent to the webhook url

GET /Irrigation/config/setup.php?zone=&run_time=&run=&when=&event=Irrigation&data=test-event&published_at=2020-12-17T21%3A28%3A50.363Z&coreid=api HTTP/1.1
User-Agent: ParticleBot/1.1 (https://docs.particle.io/webhooks)
host: mywebsite.com
Connection: keep-alive

Event
The source event that triggered the webhook

{
“name”: “Irrigation”,
“data”: “test-event”,
“ttl”: 60,
“published_at”: “2020-12-17T21:28:50.363Z”,
“coreid”: “api”
}

First you could add this to your handler

  Serial.printlnf("%s: %s", event, data);

and see what you get in the response.

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.