2017 © Pedro Peláez
 

library guzzle-wrapper

A laravel wrapper around the Guzzle Client API.

image

bitstone/guzzle-wrapper

A laravel wrapper around the Guzzle Client API.

  • Tuesday, May 16, 2017
  • by AndreiArba
  • Repository
  • 2 Watchers
  • 4 Stars
  • 733 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 1 Forks
  • 0 Open issues
  • 5 Versions
  • 6 % Grown

The README.md

Guzzle wrapper for HTTP Requests

A simple wrapper for guzzle http requests, to make the http calls using headers easier, (*1)

Install

Install this package using composer, (*2)

composer require bitstone/guzzle-wrapper

or

add the library to your composer.json file:

"bitstone/guzzle-wrapper": "^1.6"

Then you need to update the service providers array, in your config/app.php, (*3)

Bitstone\GuzzleWrapper\HttpServiceProvider::class

And the alias for the facade, (*4)

'Http' => Bitstone\GuzzleWrapper\Http::class

Usage

Http::request('GET', http://example.com/api/v1/users', ['role' => 'admin'], ['Content-Type' => 'application/json']);

Or, (*5)

Http::request('GET', http://example.com/api/v1/users?role=admin', [], ['Content-Type' => 'application/json']);
Http::request('POST', http://example.com/api/v1/users', ['option' => 'value'], ['Content-Type' => 'application/json', 'Accept' => 'application/json']);

But it's possible to call the specific http method as well:, (*6)

Http::get('http://example.com/api/v1/users');
Http::post('http://example.com/api/v1/users/1', ['option' => 'value'], ['Accept' => 'application/json']);
Http::put('http://example.com/api/v1/users/1', ['option' => 'another value'], ['Accept' => 'application/json']);
Http::delete('http://example.com/api/v1/users/1');
Http::head('http://example.com/api/v1/users/1');

The Versions

16/05 2017

dev-master

9999999-dev

A laravel wrapper around the Guzzle Client API.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Bitstone

laravel http wrapper request guzzle

16/05 2017

v1.3

1.3.0.0

A laravel wrapper around the Guzzle Client API.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Bitstone

laravel http wrapper request guzzle

16/05 2017

v1.2

1.2.0.0

A wrapper around the Guzzle Client API.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Bitstone

laravel http request

16/05 2017

v1.1

1.1.0.0

A wrapper around the Guzzle Client API.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Bitstone

laravel http request

16/05 2017

v1.0

1.0.0.0

A wrapper around the Guzzle Client API.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Bitstone

laravel http request