This topic was automatically generated from Slack. You can find the original thread here.
Hi all, I need to figure out the format of a request sent by a service, so I had the bright idea of setting the destination to a Pipedream API, so I can inspect the headers etc. I am able to see the headers in Pipedream, which is helpful, but one question I can’t answer is what is the raw format of the body? is it json, or encoded as key=value joined with ampersands? Is there a way to view the entire raw request in Pipedream?
Currently, Pipedream automatically parses JSON payloads and converts them into JavaScript objects. There isn’t a built-in way to configure the HTTP trigger to show the raw request instead of a JavaScript object. However, you can work around this by sending the payload as a string instead of a JSON object. This way, the payload will be received as a raw string, and you can inspect it in its original format within the event.body property.
Thanks for the answer. Unfortunately I have no access to or control over the original request, which is why I am looking for a way to inspect it. I will hunt around for an alternative in that case. I use Pipedream for almost everything these days, so I was always eventually going to come up with somthing it can’t do Thanks anyway!
Sure, if I need to use the raw body of the request, for webhook signature validation for example, then I just call JSON.stringify(steps.trigger.event.body) to compute the raw version of the body.