Unable to call PUT HTTP request in Wordpress

Zhen Hui Ho 1 Reputation point
2021-06-17T11:00:20.207+00:00

Hello there.

I've created a Wordpress website using Azure App Service, and recently I've installed a plugin that uses PUT request for some of its REST API.
The other REST API that uses GET & POST are working fine, but I keep getting the following 405 error message when I tried calling the PUT request using Postman software:-

106576-image.png

I tried whatever solutions I found online, such as configuring the web.config file within the Wordpress directory. But none of the solutions are working.
Here are the information about the app service:-

106559-image.png

Please let me know if there are any ways to enable HTTP PUT & DELETE requests in the app service.
Thank you in advance.

Azure App Service
Azure App Service
Azure App Service is a service used to create and deploy scalable, mission-critical web apps.
6,826 questions
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. ajkuma 22,086 Reputation points Microsoft Employee
    2021-06-18T16:54:21.167+00:00

    @Zhen Hui Ho , Thanks for posting this question.

    You may use Azure Resource Explorer- https://resources.azure.com - You'll see that there is an Edit button that you can use to call a PUT to update an item.
    Authentication to the Resource Explorer is the same as for the Azure Portal

    For a detailed steps on this, please check this doc and watch quick demo
    This REST API development tool, this is kind of like Postman for Azure.

    Typically, 405 method not allowed occurs because the HTTP method that you’re using is not supported. You may review the method that you’re using for the action.

    List of WebApps REST API operations:
    https://learn.microsoft.com/rest/api/appservice/web-apps
    https://github.com/projectkudu/kudu/wiki/REST-API

    1 person found this answer helpful.
    0 comments No comments

  2. ajkuma 22,086 Reputation points Microsoft Employee
    2021-06-23T17:43:46.76+00:00

    To update the community:

    @Zhen Hui Ho was able to replicate & modify the plugin API into a custom POST API endpoints as an alternative to the problem.

    Thanks @Zhen Hui Ho for the follow-up and sharing the solution that worked for you with the community.

    1 person found this answer helpful.
    0 comments No comments