webfiori / http
Basic library that can help in creating RESTful APIs using PHP.
Fund package maintenance!
paypal.me/IbrahimBinAlshikh
Installs: 29 745
Dependents: 3
Suggesters: 0
Security: 0
Stars: 6
Watchers: 3
Forks: 0
Open Issues: 2
Requires
- php: >=7.0
- ext-json: *
- ext-mbstring: *
- webfiori/jsonx: 3.3.x
- dev-master
- v3.3.15
- v3.3.14
- v3.3.13
- v3.3.12
- v3.3.11
- v3.3.10
- v3.3.9
- v3.3.8
- v3.3.7
- v3.3.6
- v3.3.5
- v3.3.4
- v3.3.3
- v3.3.2
- v3.3.1
- v3.3.0
- v3.2.20
- v3.2.19
- v3.2.18
- v3.2.17
- v3.2.16
- v3.2.15
- v3.2.14
- v3.2.13
- v3.2.12
- v3.2.11
- v3.2.10
- v3.2.9
- v3.2.8
- v3.2.7
- v3.2.6
- v3.2.5
- v3.2.4
- v3.2.3
- v3.2.2
- v3.2.1
- v3.2.0
- v3.1.1
- v3.1.0
- v3.0.7
- v3.0.6
- v3.0.5
- v3.0.4
- v3.0.3
- v3.0.2
- v3.0.1
- v3.0.0
- v2.x-dev
- v2.0.2
- v2.0.1
- v2.0.0
- v1.5.1
- v1.5.0
- v1.4.9
- v1.4.8
- v1.4.7
- v1.4.6
- v1.4.5
- dev-release-please--branches--master
- dev-fix-get-uri
- dev-cache
- dev-dev
- dev-updated-json-lib
- dev-rename-to-http
- dev-abstraction
- dev-json-support
This package is auto-updated.
Last update: 2024-11-20 20:48:15 UTC
README
A simple library for creating RESTful web APIs in adition to providing utilities for handling HTTP request and response. It includes inputs feltering and data validation in addion to creating user-defined inputs filters.
Supported PHP Versions
API Docs
This library is a part of WebFiori Framework. To access API docs of the library, you can visid the following link: https://webfiori.com/docs/webfiori/http .
Terminology
Following terminology is used by the library:
The Idea
The idea of the library is as follows, when a client performs a request to a web service, he is usually intersted in performing specific action. Related actions are kept in one place as a set of web services (e.g. CRUD operations on a reasorce). The client can pass arguments (or parameters) to the end point in request body as POST
or PUT
request method or as a query string when using GET
or DELETE
.
An end point is represented by the class AbstractWebService
and a set of web service (or end ponts) are grouped using the class WebServicesManager
. Also, body parameters represented by the class RequestParameter
.
Features
- Full support for creating REST services that supports JSON as request and response.
- Support for basic data filtering and validation.
- The ability to create custom filters based on the need.
Installation
If you are using composer to collect your dependencies, you can simply include the following entry in your 'composer.json' file to get the latest release of the library:
{ "require": { "webfiori/http":"*" } }
Note that the WebFiori Json library will be included with the installation files as this library is depending on it.
Another option is to download the latest release manually from Release.
Usage
For more information on how to use the library, check here