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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
davidspadola
New Member

Wb.Contents doesn't allow Delete requests

Dear community,

I've done plenty GET and POST requests using the Web.Contents and it works perfectly. The url argument that I use starts always with  "https://...", the existence of the content argument distinguishes the POST from the GET.

But now I must use a delete API that starts with "DELETE https:// ...".

THis doesn't work and I get a "DataFormat.Error: Invalid URI: The hostname could not be parsed." error.

Is it possible to any other type of request other then GET and POST with Web.Contents ?

 

Thank you all for your help

David

2 REPLIES 2
davidspadola
New Member

Thanks Daryl for your reply.

I've managed to resolve the "chatty" behaviour of PQ, indeed it was posting much more information then expected.

To respect to my initial question, and to accomplish a Delete request, I've tried using WebAction.Request, but without success. I get this error : “Expression.Error: We haven’t been given permission to perform actions against this resource.” 

I read in a post that I must install Power Query SDK and a flag an option, but I'm having trouble installing it.

Any ideas? 

Daryl-Lynch-Bzy
Resident Rockstar
Resident Rockstar

The answer is No.  Microsoft does not want you to use Web.Contents to generate transactions.  The issue is that Power Query is "too chatty".  It can send a request multiple times during the evaluation to complete the necessary tasks, so we are discouraged from using Power Query to write data.  We are lucky that POST is available, but this is normally use to submit variable to return result rather than write data.

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.

Top Solution Authors