Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/tmobaird/restful-php
https://github.com/tmobaird/restful-php
Last synced: 12 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/tmobaird/restful-php
- Owner: tmobaird
- Created: 2015-02-22T05:42:39.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2015-02-24T16:23:22.000Z (over 9 years ago)
- Last Synced: 2023-09-04T03:03:43.772Z (about 1 year ago)
- Language: PHP
- Size: 129 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# RESTful
This is the code for my RESTful coral shop application. My coral shop is located at http://ec2-54-174-106-89.compute-1.amazonaws.com/
There is no interface or anything on this page, this application simply GETs, PUTs, or DELETEs data through manipulation of the URL or through curl requests. The URL can only be manipulated to utilize the GET function. An example of this would be entered in the URL bar as:
http://ec2-54-174-106-89.compute-1.amazonaws.com/corals/
This url would display the list of all corals, and their listed price, in the database. The following URL GET request:
http://ec2-54-174-106-89.compute-1.amazonaws.com/corals/testCoral
Would search the database for all coral with the name testCoral.
Curl requests (from command line) can also be made on the web application. Curl requests for GET, PUT, and DELETE would be entered as follows:GET
------
curl http://ec2-54-174-106-89.compute-1.amazonaws.com/corals/testCoralPUT (requres name of the coral and price)
------
curl -X PUT http://ec2-54-174-106-89.compute-1.amazonaws.com/corals/testCoral -d 'price'='$59.00'DELETE (would delete testCoral from the database)
--------
curl -X DELETE http://ec2-54-174-106-89.compute-1.amazonaws.com/corals/testCoral