Пример #1
0
<?php

require_once '../vendor/autoload.php';
$rest = new \alphayax\rest\Rest('https://api.github.com/users/alphayax/repos');
$rest->addHeader('User-Agent', 'alphayax-rest');
$rest->GET();
print_r($rest);
Пример #2
0
 public function testBadURL()
 {
     $this->setExpectedException(\Exception::class);
     $rest = new \alphayax\rest\Rest('http://');
     $rest->GET();
 }