web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / HTTP header: Content-L...
Power Automate
Unanswered

HTTP header: Content-Length integer is changing to string when flow runs

(0) ShareShare
ReportReport
Posted on by 71

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!!!

 

after.png

91de7429-ad0f-4518-84c8-4f60984c51cd.png

Categories:
I have the same question (0)
  • Verified answer
    SJacobs Profile Picture
    71 on at

    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.

     

     

  • v-jefferni Profile Picture
    on at

    Hi @SJacobs ,

     

    Nice shoot! Please consider accept the apply as solution to help other users easily find it.

     

    Best regards,

  • special-analyst Profile Picture
    18 on at

    I'm facing a very simmilar problem, but happens with a HTTP query. It's value is set to be an integer, but when the flow runs the value becomes a string. I'm gonna try some different "Accept" header values, but I'm already sending the accept header with application/json value. Any other idea?

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 538 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 405 Moderator

#3
abm abm Profile Picture

abm abm 252 Most Valuable Professional

Last 30 days Overall leaderboard