JCRequest
v1.2.0
別の Guzzle ラッパー
$ composer require jaredchu/jc-request
use JC HttpClient JCRequest ;
$ response = JCRequest :: get ( $ url );
echo $ response -> status ();
echo $ response -> body ();
var_dump ( $ response -> json ());
$ response = JCRequest :: post ( $ url , $ params , $ headers );
echo $ response -> status ();
echo $ response -> body ();
var_dump ( $ response -> json ());
$ response = JCRequest :: post ( $ url , json_encode ( $ params ), $ headers );
var_dump ( $ response -> json ());
$ response = JCRequest :: get ( $ url , $ params , $ headers , [
' auth ' => [ $ userName , $ passwd ]
]);
$ response = JCRequest :: get ( $ url , $ params , $ headers , [
' connect_timeout ' => 2 ,
' timeout ' => 2
]);
$ git checkout -b feature/your-new-feature
$ git commit -am 'Add some feature'
$ git push origin feature/your-new-feature
MITライセンス