Download the PHP package simplon/border without Composer
On this page you can find all versions of the php package simplon/border. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download simplon/border
More information about simplon/border
Files in simplon/border
Package border
Short Description Request and Response handler incl. JSON-RPC
License MIT
Homepage https://github.com/fightbulc/simplon_border
Informations about the package border
_ _ _ _ ___(_)_ __ ___ _ __ | | ___ _ __ | |__ ___ _ __ __| | ___ _ __ / __| | '_ ` _ \| '_ \| |/ _ \| '_ \ | '_ \ / _ \| '__/ _` |/ _ \ '__| \__ \ | | | | | | |_) | | (_) | | | | | |_) | (_) | | | (_| | __/ | |___/_|_| |_| |_| .__/|_|\___/|_| |_| |_.__/ \___/|_| \__,_|\___|_| |_|
Simplon/Border
A small library to handle http requests and responses including JSON-RPC.
Version
0.5.2
How to install
Since this library is build with PHP 5.4 syntax you are required to have it installed. Simplon/Border can bei installed by either downloading it from github or via Composer. I encourage you to do the latter. Here is a snippet from a possible composer.json file:
Request object
The request class is basically an interface wrapper for PHP's $_SERVER variable. I also added some methods which help to identify/handle JSON-RPC requests.
Examples
Just a couple of calls to show you how we roll. Have a look at the class to see all methods:
How to handle JSON-RPC requests?
Response object
In the demand of talking HTTP? The response class does exactly that. You can use it to respond to a http request by sending:
- status codes (e.g. 200, 400, 500 ...)
- initiating a file download
- initiating a streaming process (chunking)
- return to referer
- json-rpc response
- json response
- html response
- text
- redirect to another address
Examples
Here are a couple of examples. Have a look at the class to see all:
All versions of border with dependencies
ext-json Version *