cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted

Unsupported Media Type (415) with Post OData

Hi all,

I'm trying to call a post OData but unfortunally I have this error: Unsupported Media Type (415)

Instead, with get calls, no problems Smiley Frustrated

Here my call:

let

AccessTokenHeader = "Bearer xxx"
myUrl = https://odata-dev.azurewebsites.net/odata/... content = "{ ""GetTrackProcessesParameters"":
{ ""@odata.type"":""#MyEntities.GetTrackProcessesParameters"", ""DateFrom"": ""2019-01-01"", ""DateTo"": ""2019-01-03"", ""ProcessTypeCode"": ""CODE1"", ""ActivityTypeCodes"": """" } }", Source = Json.Document(Web.Contents(myUrl, [Headers=[Authorization=AccessTokenHeader, ContentType="application/json", CacheControl="no-cache"], Content=Text.ToBinary(content)])) in Source

Any suggestion?!?

 

Thanks in advance

Luca
2 REPLIES 2
Community Support Team
Community Support Team

Re: Unsupported Media Type (415) with Post OData

Hi @laciodrom_80 ,

 

This similar thread pointed that such an error might be caused by the cached data from OData feeds in Power BI desktop. Please check if the provided solutions apply to your scenario.

 

Best regards,

Yuliana Gu

 

Community Support Team _ Yuliana Gu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Re: Unsupported Media Type (415) with Post OData

Hi @v-yulgu-msft,

 

yes I saw this similar post but unfortunally the suggested solution didn't solve the problem. I'm not using GetData, but Query Editor because I first have to get a token to use then into the OData body request.

Anyway I have no issues doing a Get OData Smiley Frustrated

Luca