0 Replies Latest reply on Apr 27, 2015 7:55 AM by ryanrutan

    Debugging Webhook Requests Using Webhookapp.com | Cubet Techno Labs Blog | Web Application Technologies

      Debugging Webhook Requests Using Webhookapp.com | Cubet Techno Labs Blog | Web Application Technologies

      Cubet Techno Labs Blog

      The blog highlights the different steps useful for debugging webhook requests using webhookapp.

      Debugging webhook requests are always a hard task for a developer, considering the multiple webhook requests and events that follows the webhook request developers resort to sending emails or saving the contents to files or using a third party service for debugging.

      Here we are going to discuss about debugging a webhook request with the help of http://webhookapp.com/. An app that helps to create multiple hooks with different URL’s and shows the requests to that url in real time and to save and examine the received request in future.

      Step.1

      create a webhookapp account

      goto http://webhookapp.com/ and signup for using this service.

      Select webhook from new hook menu.

      Create Webhook

       

      now webhook account is ready to receive requests at this URL:

      Webhook Request

       

      copy the url and you are done.

      Step .2

      Now, we access this url from our page with a curl request to this url.

      here is the sample php code i use to send curl request.

       

        
      1
      2
      3
      4
      5
      6
      7
      8
      9
      10
      11
      12
      13
      function debugWebHook($debugArray)
       {
       $ch = curl_init('12345678.proxy.webhookapp.com/');
       foreach($debugArray as $key=>$value) { $fields_string .= $key.'='.$value.'&'; }
       rtrim($fields_string, '&');
      curl_setopt($ch, CURLOPT_POST, 1);
       curl_setopt($ch, CURLOPT_POSTFIELDS,$fields_string);
       curl_setopt($ch, CURLOPT_RETURNTRANSFER, false);
       curl_setopt($ch, CURLOPT_HEADER, 0);
       $data = curl_exec($ch);
      curl_close($ch);
       return;
      }

       

      now check out the live tail to get the real time view of received requests.

       Webhook Live Tail

      Webhook Live Tail 1
      Happy debugging!!

      Know More About This Topic from our Techies

      Just thought I'd share this thread with the community. =)  Looks interesting, but haven't tried it yet.  May be related to If you could build a "quick activity integration" in 5 minutes, what technologies would you look to integrate first? =)

      Shared with Jive Anywhere