I have a flow with an HTTP action. The API I am sending the POST request to requires that I include a header called Content-Lengthwith an integer value. In the screenshot, you can see I'm entering an integer value, but after submit, the value is changed to a string, and the request is rejected for failing to include a valid Content-Length. I tried entering the value as a formula: int(1101) and I tried a compose action prior to this step where i ensured the value is an integer.
I also tried making up a random named header, entered an integer, and it's still getting converted to a string. Any ideas why this is happening, and how I might force it to remain an integer? Note that I have tested the same request in Postman and had no issues.
How do I create an HTTP request with a header that is a number? Thanks!!!
Solved! Go to Solution.
Problem solved. After more experimentation, I got this to work. The error was not caused by the Content-Length header data type. In this case, it turned out that the Accept header, which in the screenshot above shows "*/*" needed to be defined explicitly. When I changed the value to Accept: application/json, the request was successful.
Problem solved. After more experimentation, I got this to work. The error was not caused by the Content-Length header data type. In this case, it turned out that the Accept header, which in the screenshot above shows "*/*" needed to be defined explicitly. When I changed the value to Accept: application/json, the request was successful.
Hi @SJacobs ,
Nice shoot! Please consider accept the apply as solution to help other users easily find it.
Best regards,
Community Support Team _ Jeffer Ni
If this post helps, then please consider Accept it as the solution to help the other members find it.
User | Count |
---|---|
6 | |
6 | |
4 | |
4 | |
2 |
User | Count |
---|---|
8 | |
8 | |
4 | |
4 | |
4 |