Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
3 years ago
Solved

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.