Serve different ressources for the app via a HTTP Post request.
- PHP 100%
| nbproject | ||
| public | ||
| res | ||
| .gitignore | ||
| config.json.sample | ||
| LICENSE | ||
| README.md | ||
pak
Serve different ressources for the app via a HTTP Post request.
installation
- Clone the repo and make the
publicfolder accessible by the web server. - Rename
config.json.sampletoconfig.json. - Add valid key(s) to the
config.json. - Put your ressources in the
resfolder.
usage
Send a HTTP Post request with the following parameters:
key- A valid key for auth.
res- The file name of the ressource. The script will look for the file in the subfolder
res.
- The file name of the ressource. The script will look for the file in the subfolder
response
The script will response with HTTP status codes.
| code | cause |
|---|---|
| 200 | OK, return data stream |
| 400 | bad request, parameter missing |
| 401 | unauthorized |
| 404 | ressource not found |
| 405 | method not allowed, not a POST request |
| 500 | internal server error |
test
Send a HTTP POST request with a valid key and res=test. It should return
a data stream response with the contents "success".
license
@see LICENSE