italodeveloper / guzzle-zend
Abstrai o modelo de requisição do Guzzle e transforma em Zend Http Requests XD
This package's canonical repository appears to be gone and the package has been frozen as a result.
Installs: 1 658
Dependents: 3
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 0
Requires
- php: >=5.5
- ext-curl: *
README
🤘 Guzzle to Zend Http Adapter, justa change you instance ;)
O pacote está disponivel somente no metodo $client->request(...), as demais funções e novas implementações estão em aberto via GitHub.
Basta utilizar, de forma identica a utilização do Guzzle.
Zend Http + Adapter
<?php use ZendAdapter\ZendRequest as Client; require __DIR__ . '/vendor/autoload.php'; $client = new Client([ 'base_uri' => 'http://httpbin.org', 'timeout' => 2.0, ]); $response = $client->request('GET', '/root'); $response = $client->request('GET', '/root'); $responseBody = $response->getBody(); $responseBodyContents = $responseBody->getContents();
Guzzle
<?php use GuzzleHttp\Client; require __DIR__ . '/vendor/autoload.php'; $client = new Client([ 'base_uri' => 'http://httpbin.org', 'timeout' => 2.0, ]); $response = $client->request('GET', '/root'); $responseBody = $response->getBody(); $responseBodyContents = $responseBody->getContents();