简体   繁体   中英

Send POST request using postman but receiving GET request in php. I try to create API using postman

echo $req=$_SERVER["REQUEST_METHOD"]; // outputs "GET"

I try to create API using postman. When run this in localhost it's run perfectly but when run this code in a server then it's show me GET. can anyone help me?

Check your server http or https. If server is https And you send http post request then it show this kind of problem.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM