- First commit of Negundo

This commit is contained in:
mcndave committed 2023-03-29 13:52:15 +00:00
commit 69ed176b1c
18 files changed
+846

No files matched your search

+25
View File
@@ -0,0 +1,25 @@
<?php
namespace Negundo\Client\Transport;
use GuzzleHttp\Client;
class GuzzleClient implements TransportInterface {
public int $timeout = 1;
public bool $throwErrors = false;
public array $headers = [];
public function push(string $url, array $data) : ? object
{
return ( new Client([
'timeout' => $this->timeout,
]) )->post($url, [
'form_params' => $data,
'http_errors' => $this->throwErrors,
'headers' => $this->headers,
]);
}
}