https://github.com/brokeyourbike/http-client-php
HTTP client interface and supporting trait
https://github.com/brokeyourbike/http-client-php
hacktoberfest http http-client interface php php8
Last synced: 9 months ago
JSON representation
HTTP client interface and supporting trait
- Host: GitHub
- URL: https://github.com/brokeyourbike/http-client-php
- Owner: brokeyourbike
- License: mpl-2.0
- Created: 2021-10-19T10:55:36.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2023-05-20T11:40:12.000Z (almost 3 years ago)
- Last Synced: 2025-06-01T15:51:24.131Z (10 months ago)
- Topics: hacktoberfest, http, http-client, interface, php, php8
- Language: PHP
- Homepage:
- Size: 28.3 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# http-client
[](https://github.com/brokeyourbike/http-client-php/releases)
[](https://packagist.org/packages/brokeyourbike/http-client)
[](https://codeclimate.com/github/brokeyourbike/http-client-php/maintainability)
[](https://codeclimate.com/github/brokeyourbike/http-client-php/test_coverage)
Http client interface and supporting trait
## Installation
```bash
composer require brokeyourbike/http-client
```
## Usage
```php
use BrokeYourBike\HttpClient\HttpClientInterface;
use BrokeYourBike\HttpClient\HttpClientTrait;
class ApiClient implements HttpClientInterface
{
use HttpClientTrait;
public function __construct(\GuzzleHttp\ClientInterface $httpClient)
{
$this->httpClient = $httpClient;
}
}
```
## Authors
- [Ivan Stasiuk](https://github.com/brokeyourbike) | [Twitter](https://twitter.com/brokeyourbike) | [LinkedIn](https://www.linkedin.com/in/brokeyourbike) | [stasi.uk](https://stasi.uk)
## License
[Mozilla Public License v2.0](https://github.com/brokeyourbike/http-client-php/blob/main/LICENSE)