Rally Software

 View Only
  • 1.  Rally webhook returns empty body in req object

    Posted Sep 14, 2021 12:18 PM

    I am not sure why the test/example webhook from the docs returns an empty body payload at my targetURL

    {
      "AppName":     "My Cool App",
      "AppUrl":      "www.example.com",
      "Name":        "My first webhook",
      "TargetUrl":   "http://my.service.com/ready/to/receive/post",
      "ObjectTypes": ["HierarchicalRequirement", "Defect"],
      "Expressions": [
        {
          "AttributeName": "PlanEstimate",
          "Operator":      ">",
          "Value":         10
        },
        {
          "AttributeName": "Workspace",
          "Operator":      "=",
          "Value":         "31685839-67fe-4f9d-9470-da56c222998b"
        }
      ]
    }

    Here is the code:

    app.post("/rally", function requestHandler(req, res) {  res.end("RALLY")

      console.log({ data: req.body }) // { data: {} }
    }

    Here is the end of the req{}

    ....
    _header: null,
    _onPendingData: [Function: bound updateOutgoingData],
    _sent100: false,
    _expect_continue: false,
    req: [Circular],
    locals: [Object: null prototype] {},
    [Symbol(kNeedDrain)]: false,
    [Symbol(isCorked)]: false,
    [Symbol(kOutHeaders)]: [Object: null prototype] { 'x-powered-by': [Array] }
    },
    body: {},
    route: Route { path: '/rally', stack: [ [Layer] ], methods: { post: true } }
    }


  • 2.  RE: Rally webhook returns empty body in req object

    Broadcom Employee
    Posted Sep 14, 2021 12:31 PM
    Hi Elan,
    I like to use a site called Webhook Inbox in order to test the payload to ensure things are working correctly with my webhook.
    Access this website: http://webhookinbox.com/
    Click Create Inbox (As a note, these inboxes are only good for about 24 hours)
    Set your TargetURL to the address that they gave you
    Then trigger your webhook
    If you see something pop up on the webhook inbox, you know your call is firing a webhook correctly and you can verify the payload there.

    Once you know that is working you can change your TargetURL back to your destination application and if you're still not seeing a payload, then at that point you know that it's probably something with your network or application.


  • 3.  RE: Rally webhook returns empty body in req object

    Posted Sep 14, 2021 12:44 PM
    Edited by Elan Trybuch Sep 14, 2021 12:53 PM

    Hi Dave,

    Thank you for the quick reply. I am running &using http://localhost.run/ to tunnel into my app locally on my machine. I know this approach works, because I am able to receive payloads via other webhooks that I am using, e.g. Github

    I am also seeing the  output in my console.log() when I am triggering the webhook via an action performed in Rally. In the example webhook that I used from the docs, I am updating  a defect/user story by increasing the plan estimate of 11 or higher to trigger the webhook.

    What is the "something" that could be wrong with the network? And based on my application code I shared in my initial post, what do you see, if anything wrong with it?

    Thanks!

    Edit: Checking to see if our rally instance has a config setting that disallow's tunneling on the network. Using the http://webhookinbox.com, I see the payload. Please let me know if you know of such a config.