innmind / rest-client-bundle
This package is abandoned and no longer maintained.
No replacement package was suggested.
Library to consume REST APIs
4.0.0
2017-10-06 05:32 UTC
Requires
- php: ~7.1
- innmind/filesystem: ~3.0
- innmind/rest-client: ~6.0
- symfony/config: ~3.0
- symfony/dependency-injection: ~3.0
- symfony/http-kernel: ~3.0
- symfony/yaml: ~3.0
Requires (Dev)
- phpunit/phpunit: ~6.0
This package is auto-updated.
Last update: 2022-02-01 13:03:16 UTC
README
master |
develop |
---|---|
Installation
composer require innmind/rest-client-bundle
Enable the bundle by adding the following line in your app/AppKernel.php of your project:
// app/AppKernel.php class AppKernel extends Kernel { public function registerBundles() { $bundles = array( // ... new Innmind\Rest\ClientBundle\InnmindRestClientBundle, ); // ... } // ... }
Then you need to specify the types you allow in the app, here's an example:
innmind_rest_client: content_type: json: priority: 0 media_types: application/json: 0
Usage
$container ->get('innmind_rest_client') ->server('http://example.com/') ->capabilities() ->names();
This example would return all the resource available through the api of http://example.com/
.
Then you can access the following method on any server: all
, read
, create
, update
and remove
. Check the interface to understand how to use these methods.