I have the following code in my index.php:
<?php
header('Content-type: application/json');
var_dump($_SERVER);
And I make a POST request for it.
I'm just not understanding why $_SERVER['REQUEST_METHOD']
is arriving as GET
instead of POST
.
I tested with other methods like PUT
and DELETE
and it gives the same thing.