http request function |
HTTP Request Methods contain 9 type of request, the most common are GET and POST method.
Today there are a number of online tools to simulate it same as: Postman, Insomnia, Advanced REST, API tester, ... But I will show you about a tool, which can test in localhost and other host (some tools do not support).
The first, I will create a API Post in my localhost by PHP.
The first, I need allow access-control-allow-origiin:* in my API, and check POST param.
My File PHP |
Now, go to https://w3webtool.com/http-request-method to test. fill out URL, choose Method, and add Parameter and click Send by CLIENT to test API under localhost.
POST param method to localhost |
Now, I will test method with IP-API at http://ip-api.com/docs/api:json
I have URL http://ip-api.com/json and method GET to get API by Send By SERVER
get Function |
You can try with your API now. Hope it useful for you.
No comments:
Post a Comment