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 / Difference in contents...
Power Automate
Unanswered

Difference in contents when sending docx file via HTTP post vs Insomnia or curl

(0) ShareShare
ReportReport
Posted on by 3

Hello guys,


I am trying to send a docx file via an http post request to an api. The api is rejecting the docx file. The same document sent via curl and Insomnia is accepted by the api.

In order to debug, I have tried to simplify showing the problem by narrowing down to these two calls that I have caught in requestbin.

https://public.requestbin.com/r/en1upvrnl9ik1/2USmOcTxKC1uiGH6vvyDFvG4L5i


The first one is made from the HTTP action in my flow.

jazy_ac_0-1692942115024.png

jazy_ac_1-1692942133587.png

jazy_ac_0-1692942918949.png

 

The second one is made from insomnia.

jazy_ac_5-1692942578331.png

 

jazy_ac_1-1692942968335.png

 

 

As you can see there are clear differences. I am suspecting the problem to be in the content field. It seems there are a larger number of periods in the flow http one, when compared to the insomnia call. I compared the content field after removing all the periods from both calls, the contents are identical afterwards.

jazy_ac_2-1692942987354.png

 

 

Why would there be these extra periods?

What can I do to eliminate this difference?

 

I have tried different things, but to no avail. Here are a few that i remember--

1. body('Get_file_content')

2. 'Get_file_content'

3.  with or without content-type in header of content field

4. adding a mimetype header

 

Regards

Categories:
I have the same question (0)
  • Verified answer
    SamLed Profile Picture
    2,338 Moderator on at

    Hi,

     

    Give a try removing double quotes enclosing your content bytes.

     

    SamLed_0-1693290138527.png

    ______________________________________________________________

    If I have answered your question, please Accept the post as solution.
    If you like my response, please Thumbs Up.

     

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 522 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 364 Moderator

#3
abm abm Profile Picture

abm abm 243 Most Valuable Professional

Last 30 days Overall leaderboard