Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/piotrpress/remoter
This library is a chainable HTTP Client based on file_get_contents() function.
https://github.com/piotrpress/remoter
chain chainable file-get-contents header headers http http-client httpclient php remoter request response url
Last synced: 7 days ago
JSON representation
This library is a chainable HTTP Client based on file_get_contents() function.
- Host: GitHub
- URL: https://github.com/piotrpress/remoter
- Owner: PiotrPress
- License: mit
- Created: 2022-05-06T13:20:05.000Z (over 2 years ago)
- Default Branch: master
- Last Pushed: 2022-05-06T13:49:25.000Z (over 2 years ago)
- Last Synced: 2024-12-20T13:02:41.620Z (21 days ago)
- Topics: chain, chainable, file-get-contents, header, headers, http, http-client, httpclient, php, remoter, request, response, url
- Language: PHP
- Homepage:
- Size: 2.93 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
- License: license.txt
Awesome Lists containing this project
README
# Remoter
This library is a chainable HTTP Client based on [file_get_contents()](https://www.php.net/manual/en/function.file-get-contents.php) function.
## Installation
```shell
$ composer require piotrpress/remoter
```## Example
```php
require __DIR__ . '/vendor/autoload.php';use PiotrPress\Remoter\Request;
use PiotrPress\Remoter\Url;
use PiotrPress\Remoter\Header;echo ( ( new Request(
( new Url(
'https://api.github.com'
) )->setPath( '/repos/PiotrPress/remoter' ),
'GET',
( new Header(
[ 'User-Agent' => 'PiotrPress/Remoter' ],
true
) )->set( 'Accept', 'application/vnd.github.v3+json' )
) )->send() )->getHeader()->get( 'code' );
```## Requirements
PHP >= `7.4` version.
## License
[MIT](license.txt)