Skip to content

This package will help you to get data easier than usual from guzzle.

License

Notifications You must be signed in to change notification settings

RezaParsian/Guzzle

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

guzzle

Guzzle, PHP HTTP client

Guzzle is a PHP HTTP client that makes it easy to send HTTP requests and trivial to integrate with web services.

Simple interface for building query strings, POST requests, streaming large uploads, streaming large downloads, using HTTP cookies, uploading JSON data, etc...

But It's hard to read response form end points.

This package will help you to get data easier than usual.

Instaliation

composer require rp76/guzzle

Usage

$client = new \Rp76\Guzzle\Client(); // make new instance

$request = new \GuzzleHttp\Psr7\Request('GET', 'https://rp76.ir');

return $client->easySend($request); // get body of response

Availbe methods

Method Short one
$client->easySend($request)->getBody() $client->easySend($request)->body
$client->easySend($request)->getJson() $client->easySend($request)->json
$client->easySend($request)->getObject() $client->easySend($request)->object
$client->easySend($request)->getHeaders() $client->easySend($request)->headers
$client->easySend($request)->getHeader()
$client->easySend($request)->getRequestHeaders() $client->easySend($request)->requestHeaders
$client->easySend($request)->getRequestHeader()
$client->easySend($request)->getStatusCode() $client->easySend($request)->statusCode
$client->easySend($request)->success()
$client->easySend($request)->getRequestParams() $client->easySend($request)->requestParams
$client->easySend($request)->getRequestUrl() $client->easySend($request)->requestUrl
$client->easySend($request)->getEffectiveUrl() $client->easySend($request)->effectiveUrl
$client->easySend($request)->getResponseTime() $client->easySend($request)->ResponseTime

getEffectiveUrl: return request url after redirect.

License

The MIT License (MIT). Please see License File for more information.

About

This package will help you to get data easier than usual from guzzle.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages