Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Anonymous
Not applicable

Problem doing a POST request to download a file with Power Query

Hello. I have made two queries in POSTMAN to be able to download a file from a Rest API.

  • In the first query I obtain the session ID resulting from performing a GET with username and password. The headers obtained from this GET are: Host, UserAgent, Accept, Accept-Encoding, Connection and Cookie (with the session ID).
  • In the second and last query, I did a POST request with some parameters in the body (action, date, id, parameter1, JSONanswer, parameter2) and in the headers: content-type, accept-encoding, conecction, sec-ch-ua, sec-ch-ua-mobile, sec-ch-ua-platform, Upgrade-Insecure-Request, User-Agent, Accept, Host, Content-Lenght)

How can i perform the same process with power query? I could make the GET request and i have now a session ID but i dont know how to do the POST request to obtain the same file that i can download doing the POST request in POSTMAN.

1 ACCEPTED SOLUTION
ImkeF
Community Champion
Community Champion

Hi @Anonymous ,
to transform a GET to a POST request in Power Query you must add a record with a Content-field as a parameter to the call:
Chris Webb's BI Blog: Web Services And POST Requests In Power Query (crossjoin.co.uk)
Transformation of the content can easily be done using the Json.FromValue function:
Easy POST requests with Power BI and Power Query using Json.FromValue – (thebiccountant.com)



Imke Feldmann (The BIccountant)

If you liked my solution, please give it a thumbs up. And if I did answer your question, please mark this post as a solution. Thanks!

How to integrate M-code into your solution -- How to get your questions answered quickly -- How to provide sample data -- Check out more PBI- learning resources here -- Performance Tipps for M-queries

View solution in original post

1 REPLY 1
ImkeF
Community Champion
Community Champion

Hi @Anonymous ,
to transform a GET to a POST request in Power Query you must add a record with a Content-field as a parameter to the call:
Chris Webb's BI Blog: Web Services And POST Requests In Power Query (crossjoin.co.uk)
Transformation of the content can easily be done using the Json.FromValue function:
Easy POST requests with Power BI and Power Query using Json.FromValue – (thebiccountant.com)



Imke Feldmann (The BIccountant)

If you liked my solution, please give it a thumbs up. And if I did answer your question, please mark this post as a solution. Thanks!

How to integrate M-code into your solution -- How to get your questions answered quickly -- How to provide sample data -- Check out more PBI- learning resources here -- Performance Tipps for M-queries

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.