Zia project's API for Epitech Students
Zia is an Epitech project, from the third year. The goal is to achieve a modulable HTTP server, fully configurable and using a common API shared among all students
Feel free to contribute !
The API is divided into 3 major interfaces :
- Module
- Request
- Response
The Module interface must be implemented by every modules. You can see them as middlewares, applied one after an other by your server for each incoming requests.
Every Module implements a single method, exec, taking as parameters the request and the response
virtual void exec(Request &request, Response &response) = 0;
The Request represents the incoming HTTP request. It gives you access to a large variety of parameters from the request, such as the host, the body, headers, and so on
The Request can be modified by a module, so the next module will access the modified request. For example, you can implement a JSON parser module, parsing the textual body into JSON and forwarding the result to every modules coming after
The Response represent an HTTP response. Every modules can apply modifications on it, and once every modules are executed, the response will be serialized and sent according through the HTTP protocol
Documentation, automatically updated to match the latest api version, is available HERE
-
Module interface
-
Request interface
-
Response interface
-
HTTP status
-
HTTP methods
-
Code documentation
-
Documentation automatically generated and deployed
-
Issue template
-
Feature request template
-
Pull request template
- Fork it
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create a new Pull Request