Share feedback, ideas and get community help

Updated 9 months ago

HTTP Request custom body not working.

At a glance

The community member added an HTTP Request integration to their flow, defined the URL for the POST, and the JSON for the variables in the custom body. However, the receiving side had an empty body. The community member tried manual variable population but the issue persisted. Other community members suggested trying webhook.site, which worked, but the Azure Logic App URL did not receive the JSON body. To resolve this, the community member had to add the Content-Length header and a value. They found a way to dynamically calculate the content length using a JavaScript variable function, which solved the issue for Azure Logic Apps.

I added a HTTP Request integration to my flow, defined the URL where the POST should be sent, and then defined the JSON for the variables I want in the custom body. On the receiving side of the POST, the body is empty. I tried the manual variable population for test and still remained empty. Am I doing something incorrectly? Thanks for your help.
B
j
7 comments
Can you try with webhook.site?
It should work
If not, provide a reproduction for us to try πŸ™‚
I tried webhook.site and it did receive the json body πŸ™‚ When I pointed to our Azure Logic App url, it did not receive the json body πŸ˜• . Do you know of any tips or users who have it working with a Azure Logic App? Thanks.
I got it to work, yet I need to advice. I had to add the header Content-Length and a value. Is there a way to dynamically estimate the Content-Length of my JSON data that is in the custom body?
Maybe a variable function for length that can then be place in the value window for the Content-Length key header. {{={{My variable}}.length()=}}
I figured out a way to calculate the content length using Set variable with JS code. Then I set the Content-Length header to the contentLength variable. It solved it for Logic Apps.
Attachment
image.png
Add a reply
Sign up and join the conversation on Discord