Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mcmatters/ticl
https://github.com/mcmatters/ticl
curl http-client
Last synced: about 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/mcmatters/ticl
- Owner: MCMatters
- Created: 2018-07-13T07:48:31.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2023-10-22T17:14:21.000Z (over 1 year ago)
- Last Synced: 2024-04-25T04:45:18.378Z (9 months ago)
- Topics: curl, http-client
- Language: PHP
- Size: 45.9 KB
- Stars: 1
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
## Tiny Http Client
### Installation
```bash
composer require mcmatters/ticl
```### Usage
```php
get('http://example.com/api/user?token=test');
$user = $response->json();
} catch (\McMatters\Ticl\Exceptions\RequestException $e) {
$error = $e->asJson();
} catch (\Throwable $e) {
$error = $e->getMessage();
}
```### Note
If you want something more customizable, then please use [Guzzle](https://github.com/guzzle/guzzle)