Skip to content

Releases: SoloPHP/HTTP-Client

v3.1.0

Choose a tag to compare

@SoloPHP SoloPHP released this 16 Oct 20:47

Added

  • Multipart/form-data support - New methods for file uploads and form submissions
    • postMultipart() - Send POST requests with multipart data
    • putMultipart() - Send PUT requests with multipart data
    • patchMultipart() - 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

Choose a tag to compare

@SoloPHP SoloPHP released this 30 Sep 12:27

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

Choose a tag to compare

@SoloPHP SoloPHP released this 16 May 11:42

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 = null to ?ResponseInterface $response = null

v2.1.0

Choose a tag to compare

@SoloPHP SoloPHP released this 06 Dec 12:30

make method getBaseUrl public

v2.0.1

Choose a tag to compare

@SoloPHP SoloPHP released this 04 Dec 14:46

fix: createRetryMiddleware

v2.0.0

Choose a tag to compare

@SoloPHP SoloPHP released this 04 Dec 13:56

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

v1.0.3

Choose a tag to compare

@SoloPHP SoloPHP released this 19 Sep 20:59

Fix CURLOPT_HTTP_VERSION

v1.0.2

Choose a tag to compare

@SoloPHP SoloPHP released this 19 Sep 19:45

Fix CURLOPT_SSL_VERIFYHOST

v1.0.1

Choose a tag to compare

@SoloPHP SoloPHP released this 07 Aug 19:07
  • Code optimization

v1.0.0

Choose a tag to compare

@SoloPHP SoloPHP released this 13 Jul 14:45

Initial release