08-19-2018 02:39 AM - last edited on 05-08-2023 11:05 AM by Paul Zimmerman
Hi,
I've written a really simple webhook listener in PHP and I've subscribed to it in the WLC. The WLC says it successfully publishes data to the webhook, but all I get is jibberish blank characters, special characters, etc. I tested the same webhook listener with an online API tester and it works fine - receives the POST and dumps it to a text file. When I do the same thing from the WLC however, it's unintelligable.
Here's my code... It works fine with CURL, etc... but WLC returns jibberish.
webhooklistener.php
<html>
<body>
<?php
$file = "wlcwebhook.txt";
$request = file_get_contents('php://input');
file_put_contents($file, $request);
?>
</body>
</html>
POST info from WLC;
It's like I need to decrypt / decode it somehow, but I can't see any mention of the WLC sending anything other than plain text - did I miss something? Or is it bust and it really is just posting crap? Any ideas?
I'm using a vWLC on v8.8.100.0
Thanks,
Rich
08-19-2018 02:54 AM
08-19-2018 03:12 AM
08-19-2018 03:47 AM
Rebooted WLC a couple more times - and it works. I tried to debug via 'Debug DX ...' on WLC too but it's not documented in the 8.8 Command Reference so a little trial and error, and it didn't reveal anything useful anyway.
Works now... JSON lovliness.
08-19-2018 07:58 AM
Nope - it's broken again. Very intermittent... seems it fails more than it succeeds :(
04-03-2020 12:43 PM
Would you mind sharing your Webhook config on the WLC side? I'm working on something similar to import into Grafana
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide