2017 © Pedro Peláez
 

library ticl

Tiny http client

image

mcmatters/ticl

Tiny http client

  • Monday, July 30, 2018
  • by MCMatters
  • Repository
  • 1 Watchers
  • 1 Stars
  • 11 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 1 Versions
  • 0 % Grown

The README.md

Tiny Http Client

Installation

composer require mcmatters/ticl

Usage

<?php

declare(strict_types=1);

require 'vendor/autoload.php';

$client = new \McMatters\Ticl\Client();

try {
    $response = $client->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, (*1)

The Versions

30/07 2018

dev-master

9999999-dev

Tiny http client

  Sources   Download

MIT

The Requires

  • php >=7.0
  • ext-curl *
  • ext-json *

 

by Dmitry Borzyonok