Skip to main content

Using the API Class

Phlame provides a built-in API class, which allows you to access parts of the request using simple methods, the class also allows you to format and send responses more effectively.

Handling Headers and Body

The API class in Phlame provides intuitive methods for handling HTTP headers in the requests. This allows you to utilize the headers in the request more easily and in a more efficient fashion.

Authentication Support

Authentication is a critical aspect of API development, and the API class in Phlame simplifies the process by providing built-in support for various authentication mechanisms. It also provides the ability of hashing on receiving requests, the API class offers flexible options to integrate authentication seamlessly into your API endpoints.

Parameter Handling

Dealing with request parameters is a common requirement in API development, and the API class in Phlame offers comprehensive support for parameter handling. The API class provides methods to extract and validate parameters with ease, ensuring the integrity and security of your API endpoints.

Data Modification and Formatting

In addition to handling incoming requests, the API class in Phlame empowers you to modify and format data before sending it back to clients. Whether you need to transform data structures, apply custom formatting rules, or sanitize output, the API class offers a range of utilities to tailor the API response according to your application's requirements.