Hi all, sending post request from postman to test an api im building. when i return the $_SERVER variable to postman from my server its showing request type as GET but clearly sending post request. What can i do to fix this?
curl -X POST
http://mysite.ca
-H ‘Accept: application/json’
-H ‘Cache-Control: no-cache’
-H ‘Content-Type: application/json’
-H ‘Postman-Token: f206add3-3869-4f33-aead-c2eb42823b47’
-H ‘X-Custom-Auth-Header: 1111111111’
-d ‘{
“store_id”:11111,
“producer”:“stores/abcde”,
“scope”:“store/order/statusUpdated”,
“data”:{
“type”:“order”,
“id”:173331
},
“hash”:“3f9ea420af83450d7ef9f78b08c8af25b2213637”
}’
$_SERVER Variable
GETArray
(
[USER] => www-data
[HOME] => /var/www
[SCRIPT_NAME] => /index.php
[REQUEST_URI] => /
[QUERY_STRING] =>
[REQUEST_METHOD] => GET
[SERVER_PROTOCOL] => HTTP/1.1
[GATEWAY_INTERFACE] => CGI/1.1
[REMOTE_PORT] => 49502
[SCRIPT_FILENAME] => /var/www/mysite.ca/index.php
[SERVER_ADMIN] => myemail@gmail.com
[CONTEXT_DOCUMENT_ROOT] => /var/www/mysite.ca
[CONTEXT_PREFIX] =>
[REQUEST_SCHEME] => https
[DOCUMENT_ROOT] => /var/www/mysite.ca
[REMOTE_ADDR] => 11.11.11.11
[SERVER_PORT] => 443
[SERVER_ADDR] => 11.11.11.11
[SERVER_NAME] => mysite.ca
[SERVER_SOFTWARE] => Apache/2.4.33 (Ubuntu)
[SERVER_SIGNATURE] =>