Download the PHP package aviyandev/http without Composer
On this page you can find all versions of the php package aviyandev/http. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Please rate this library. Is it a good library?
Informations about the package http
AviyanDev HTTP
A lightweight, modern PHP HTTP abstraction package inspired by Symfony HttpFoundation — with zero third-party dependencies. Supports PSR-7, PSR-15, fluent API, middleware, and custom HTTP exceptions.
Features
- PSR-7 compatible Request & Response classes
- PSR-15 Middleware support
- Fluent API for building responses
- Immutable request object design
- Custom HTTP Exceptions (404, 401, 403, etc.)
- No external dependencies
- Cookie and Session management
- File uploads handling
- JSON response helpers
- Stream abstraction
Installation
Basic Usage
Creating a Response
Handling Requests
Working with Middleware
File Uploads
Session Handling
API Reference
Response Class
setContent(string $content): Set response contentsetStatusCode(int $code): Set HTTP status codeheaders->set(string $key, string $value): Set response headersend(): Send the response
Request Class
query: GET parametersrequest: POST parametersheaders: Request headerscookies: Cookie parametersfiles: Uploaded filesgetMethod(): Get HTTP methodgetUri(): Get request URI
JsonResponse Class
setData(array $data): Set JSON datawithEncoding(int $options): Set JSON encoding options
Stream Class
write(string $data): Write to streamread(int $length): Read from streamgetContents(): Get remaining contentsgetSize(): Get stream size
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
License
This package is open-sourced software licensed under the MIT license.
All versions of http with dependencies
PHP Build Version
Package Version
No informations.
The package aviyandev/http contains the following files
Loading the files please wait ...