Download the PHP package maplephp/http without Composer
On this page you can find all versions of the php package maplephp/http. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download maplephp/http
More information about maplephp/http
Files in maplephp/http
Informations about the package http
MaplePHP - A Full-Featured PSR-7 Compliant HTTP Library
MaplePHP/Http is a powerful and easy-to-use PHP library that fully supports the PSR-7 HTTP message interfaces. It simplifies handling HTTP requests, responses, streams, URIs, and uploaded files, making it an excellent choice for developers who want to build robust and interoperable web applications.
With MaplePHP, you can effortlessly work with HTTP messages while adhering to modern PHP standards, ensuring compatibility with other PSR-7 compliant libraries.
Why Choose MaplePHP?
- Full PSR-7 Compliance: Seamlessly integrates with other PSR-7 compatible libraries and frameworks.
- User-Friendly API: Designed with developers in mind for an intuitive and straightforward experience.
- Comprehensive Functionality: Handles all aspects of HTTP messaging, including requests, responses, streams, URIs, and file uploads.
- Flexible and Extensible: Easily adapts to projects of any size and complexity.
Installation
Install MaplePHP via Composer:
Handling HTTP Requests
Creating a Server Request
To create a server request, use the ServerRequest
class:
Accessing Request Data
You can easily access various parts of the request:
Modifying the Request
Requests are immutable; methods that modify the request return a new instance:
Managing HTTP Responses
Creating a Response
Create a response using the Response
class:
Setting Status Codes and Headers
You can set the HTTP status code and headers:
Sending the Response
To send the response to the client:
Working with Streams
Streams are used for the message body in requests and responses.
Creating a Stream
Reading and Writing with stream
Using Streams in Requests and Responses
Manipulating URIs
URIs are used to represent resource identifiers.
Creating and Modifying URIs
Accessing URI Components
Handling Uploaded Files
Manage file uploads with ease using the UploadedFile
class.
Accessing Uploaded Files
Using the HTTP Client
Send HTTP requests using the built-in HTTP client.
Sending a Request
Conclusion
MaplePHP/Http is a comprehensive library that makes working with HTTP in PHP a breeze. Its full PSR-7 compliance ensures that your applications are built on solid, modern standards, promoting interoperability and maintainability.
Whether you're handling incoming requests, crafting responses, manipulating URIs, working with streams, or managing file uploads, MaplePHP provides a clean and intuitive API that simplifies your development process.
Get started today and enhance your PHP applications with MaplePHP!