2017 © Pedro Peláez
 

library laravel-http-rest-client

Simple REST client for Laravel

image

enathan/laravel-http-rest-client

Simple REST client for Laravel

  • Wednesday, February 18, 2015
  • by eNathan
  • Repository
  • 1 Watchers
  • 2 Stars
  • 2,562 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 2 Forks
  • 0 Open issues
  • 1 Versions
  • 0 % Grown

The README.md

laravel-http-rest-client

Simple HTTP rest client for Laravel by eNathan, (*1)

Installation via Composer

Add the following to your composer.json's dependency list:, (*2)

    "require": {
        "enathan/laravel-http-rest-client"
    }

Update Composer

In the root directory of your Laravel project (where composer.json is located), run:, (*3)

composer update

Add Service Provider

Open config/app.php and add the following line to the providers array:, (*4)

$providers => [
... ,
'App\Providers\LaravelHttpRestClient'
];

Usage

The RestClient is a singleton registered in Laravel's IoC as HttpRestClient. You can access the rest client by using \App::make('HttpRestClient')., (*5)

Example

$RestClient = \App::make('HttpRestClient');
$response = $RestClient->get('http://my_rest_server.com/',
    array(
        'username': 'foo',
        'password': 'bar
    )
);

The Versions

18/02 2015

dev-master

9999999-dev

Simple REST client for Laravel

  Sources   Download

MIT

by Avatar eNathan