Releases: SoloPHP/HTTP-Client
Releases · SoloPHP/HTTP-Client
Release list
v3.1.0
Added
- Multipart/form-data support - New methods for file uploads and form submissions
postMultipart()- Send POST requests with multipart dataputMultipart()- Send PUT requests with multipart datapatchMultipart()- Send PATCH requests with multipart data
- Automatic file handling with custom filename and MIME type support
- Multiple file upload support in a single request
Example
$client->postMultipart('/upload', [
'name' => 'John Doe',
'avatar' => ['path' => '/path/to/avatar.jpg'],
'document' => [
'path' => '/path/to/doc.pdf',
'filename' => 'my-doc.pdf',
'mime_type' => 'application/pdf'
]
]);v3.0.0
Breaking change release with redesigned API for better developer
experience.
Key Features
- Fluent API - Chain methods for easy configuration
- Built-in retry mechanism with exponential backoff
- PSR-3 Logger integration for request/response logging
- Enhanced JSON handling with dot notation access
- Async request support
Example
$client = HttpClient::create('https://api.example.com')
->timeout(30)
->withToken('your-token')
->retry(3, 1000);
$response = $client->get('/users');
$userName = $response->json('user.profile.name');Breaking Changes
- Complete API redesign - not backward compatible with v2.x
- Removed AbstractHttpClient class
- Minimum PHP 8.1, Guzzle 7.10
v2.1.1
Fixed PHP 8.0+ deprecation warnings by explicitly declaring nullable parameters in closures.
- Updated parameter type hints in createDecider() and createDelay() methods
- Changed
ResponseInterface $response = nullto?ResponseInterface $response = null
v2.1.0
v2.0.1
v2.0.0
feat!: rewrite HTTP client using Guzzle with retry functionality
BREAKING CHANGES:
- Complete rewrite using Guzzle HTTP client
- Changed from trait to abstract class
- Requires PHP 8.1+
- Automatic retry on rate limits (429) and server errors (5xx)
- JSON response handling by default
- New method getBaseUrl() required in child classes
- Changed response handling interface
- Removed direct curl usage
- New configuration format for client options
Features:
- Configurable retry attempts
- Exponential backoff strategy
- Retry-After header support
- Fluent interface
- Async request support
- Better error handling
- Full PSR-7 compatibility