We use cookies to improve your experience. No personal information is gathered and we don't serve ads. Cookies Policy.

ExpressionEngine Logo ExpressionEngine
Features Pricing Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University
Log In or Sign Up
Log In Sign Up
ExpressionEngine Logo
Features Pro new Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University Blog
  • Home
  • Forums

Testing and logging third party calls/notifications to endpoints

Development and Programming

From EE Slack's avatar
From EE Slack
185 posts
one year ago
From EE Slack's avatar From EE Slack

I have a third party service that sends a JSON to an endpoint on my server, (basically it just calls a public method on a custom addon) and I’d like to see what is received. What do you use to test that kind of third party calls/notifications?

       
From EE Slack's avatar
From EE Slack
185 posts
one year ago
From EE Slack's avatar From EE Slack

So a nice group effort on this one in slack. The first suggestion was the old favorite var_dump, but it was not practical as it was a third party calling in and no idea on the timing.

The next option- logging. Tom mentioned https://docs.expressionengine.com/latest/development/legacy/libraries/logger.html which makes something like this easy:

ee()->load->library('logger');
$payload = print_r($post_var, trus);
ee()->logger->developer($payload);

Ultimate, the tool being sought was https://webhook.site/

> Webhook.site - Test, process and transform emails and HTTP requests > Instantly generate a free, unique URL and email address to test, inspect, and automate (with a visual workflow editor and scripts) incoming > HTTP requests and emails

With https://ngrok.com/docs/getting-started/ as another popular alternative.

       

Reply

Sign In To Reply

ExpressionEngine Home Features Pro Contact Version Support
Learn Docs University Forums
Resources Support Add-Ons Partners Blog
Privacy Terms Trademark Use License

Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.