Responz
A library providing a simple model for HTTP responses in Java, PHP and JS.
Responz is a server-side utility library that provides a simplistic model for HTTP responses. It allows software developers to quickly and easily instantiate various types of responses and convert them into JSON format. They can then be sent as an HTTP response from a server to a client. The library only includes a model without any communication functionality, so it can be used in multiple frameworks and platforms and in both server-side and client-side implementations.
Download for Java
Download for PHP
Download for JS
Features
- Rapid creation of existing types of HTTP responses.
- Create custom HTTP responses.
- Provides a common model for all responses.
- Can be used with any platform, framework and architecture.
- Can be utilized on both server and client sides to encode and decode responses.
Supported languages
Java
The Responz library is available in Java. You can use this with any Java project, including plain Java (SE), Java EE, Android SDK, Google Cloud SDK and more. The Java version uses the GSON library to serialize and de-serialize responses automatically. The Java version is destined for use both in server and client environments. GSON is built-in to the Response library, so you do not need to download and import it separately.
Prerequisites:
- Java 8+
PHP
A version of the Responz library is also available in PHP, mainly for the server-side. The library for PHP uses the EasyJSON library and is mainly purposed for serializing PHP objects to JSON objects and formatted text. You can also de-serialize JSON text using PHP's native method, json_decode().
Prerequisites:
- PHP 7.0+
JavaScript
The JavaScript version of the Responz library is destined for use on both server-side and client-side scripts. The library utilizes native JavaScript only, without any use of external libraries.
Prerequisites:
- JavaScript ECMA5+
- A modern browser or JavaScript compiler
Documentation
For the documentation please visit our documentation page.
License
The Response library is released under the Apache 2.0 license.