Hello Community,
I have a question.
I have index.php file in structure folder like this : http://massplannertom.azurewebsites.net/api/ExternalApi/InitializeClientz/
and it contain only json content.
I want index.php file host in azure website recieve POST request from client written in .NET and respond with content in that PHP file, that json content
I have added web.config in wwwroot with following structure
But when running client tools, Fiddler show HTTP 405 “Method Not Allowed” , > The page you are looking for cannot be displayed because an invalid method (HTTP verb) is being used. Which is not support POST request.
How can index.php serve POST request from client tools running in window ?
So for starters, i’m pretty sure this falls under a different category than the one you’ve selected.
However, Can you show the browser request that’s being rejected from the developer tools? I have a sneaking suspicion that you’re not actually getting as far as the POST request…
Well according to that screenshot, the server is only set to accept GET,HEAD,OPTIONS,and TRACE. So wherever you’ve put this config file, it’s either incorrect or not being read, or the server needs to be restarted to pick up the new configuration.
I suspect you might be better asking in the server configuration / hosting sections, this isn’t really anything to do with PHP code as far as I can see. While the issue is that your PHP code isn’t responding, it doesn’t look like that’s down to the code.