get() публичный Метод

API call method for sending requests using GET
public get ( string $path, array $data = null ) : mixed
$path string Path of the endpoint
$data array Data to be sent along with the request
Результат mixed
Пример #1
0
 public function testHttpGetMethodSet()
 {
     $api = new Api('*****@*****.**', 'Auth Key');
     $result = $api->get('test');
     $this->assertEquals("get", $result['method']);
 }
Пример #2
0
 public function testInvalidAuthenticationWithInvalidParameters()
 {
     self::setExpectedException(AuthenticationException::class);
     $api = new Api('foo.domain.tld', 'KEY');
     $api->get('/bogus', []);
 }