0
I have the following code in my index.php:
<?php
header('Content-type: application/json');
var_dump($_SERVER);
And I’ll file a POST request for him.
I just don’t understand why $_SERVER['REQUEST_METHOD'] is coming as GET instead of POST.
I tested with other methods like PUT and DELETE and gives the same.

Are you using any framework? It would be Laravel?
– Wallace Maxters
I am asking this, but I will give my pinch: Generally, requests that have redirect, return
GETthere in theREQUEST_METHOD. I think it might be happening to you– Wallace Maxters
No friend, I am not using any framework. In this case, how would I solve this? Have a switch in the API that looks at the ['REQUEST_METHOD'], the way it is not working right....
– ABCDEFGH