Check availability of HTTP request methods
To be able to use a REST API with apache and PHP you need to know if your ISP allows the different HTTP request methods POST, GET, PUT and DELETE. Many providers only allow for POST and GET.
To test if all methods are available, just upload and unzip this file on your server. It only checks if these methods are available, but does not actually do any CRUD (create, read, update or delete) operations. It simply sends back the posted resource and query data. If any of the methods are not available, a HTTP error will be thrown. You can also force a server error by selecting the checkbox.
- This demo belongs to part 1 of the tutorial: REST with Dojo and PHP.
- Checkout also the second demo part 1: Lazy load, update, create and delete dijit tree items.
Demo to check if all HTTP request methods are available
force HTTP request error
- send POST: php-rest-check.php/images/1
- send GET: php-rest-check.php/images
- send PUT: php-rest-check.php/images/1
- send DELETE: php-rest-check.php/images/1
Note: DELETE and GET use the request querystring to send additional data, POST and PUT use the request body.
Download the zipped demo file php-rest-check.zip