I'm trying below power query to pull data from WebApi but it's throwing error. It's working fine in Postman. Any help would be appreciated. Thanks
Body=
[
#"apiKey"= "<ApiKey>"
],
webdata = Web.Contents("https://api.website.com/api/Profile/GetAllProfiles",
[Headers=[#"Content-Type"="application/json"],
Content=Text.FromBinary(Body)
])
in
webdata
Error:
Expression.Error: We cannot convert a value of type Record to type Binary.
Details:
Value=
apiKey=<ApiKey>
Type=[Type]
Body=
[
#"apiKey"= "<ApiKey>"
],
webdata = Web.Contents("https://api.website.com/api/Profile/GetAllProfiles",
[Headers=[#"Content-Type"="application/json"],
Content=Text.FromBinary(Body)
])
in
webdata
Error:
Expression.Error: We cannot convert a value of type Record to type Binary.
Details:
Value=
apiKey=<ApiKey>
Type=[Type]