Download the PHP package phpexperts/rest-speaker without Composer

On this page you can find all versions of the php package phpexperts/rest-speaker. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package rest-speaker

RESTSpeaker

TravisCI Maintainability Test Coverage

RESTSpeaker is a PHP Experts, Inc., Project meant to ease the accessing of APIs.

This library's Speaker classes utilize the Guzzle HTTP Client via the Composition architectural pattern.

It further extends base Guzzle so that it automagically decodes JSON responses and is much easier to work with.

Translations: es

Installation

Via Composer

Change log

Version 3.0.0

Version 2.8.0

Version 2.7.0

Please see the changelog for more information on what has changed recently.

Usage

Comparison to Guzzle

Use cases

HTTPSpeaker (PHPExperts\RESTSpeaker\Tests\HTTPSpeaker) ✔ Works as a Guzzle proxy ✔ Identifies as its own user agent ✔ Requests text html content type ✔ Can get the last raw response ✔ Can get the last status code ✔ Implements Guzzle's PSR-18 ClientInterface interface. * ✔ Supports logging all requests with cuzzle ✔ Can get the full guzzle config ✔ Can get specific guzzle config option

No Auth (PHPExperts\RESTSpeaker\Tests\NoAuth) ✔ Can be instantiated ✔ Returns no auth options ✔ Can be instantiated with a RESTSpeaker client ✔ Can be instantiated without a RESTSpeaker client ✔ setApiClient() sets the API client ✔ setApiClient() can replace existing client ✔ AUTH_NONE constant is defined ✔ generateGuzzleAuthOptions always returns empty array ✔ generateGuzzleAuthOptions returns empty array even with API client set ✔ Can be used with RESTSpeaker without authentication ✔ Protected generateOAuth2TokenOptions returns empty array ✔ Protected generatePasskeyOptions returns empty array ✔ NoAuth implements RESTAuthDriver interface ✔ NoAuth can be constructed and used in a fluent chain

RESTAuth (PHPExperts\RESTSpeaker\Tests\RESTAuth) ✔ Cannot build itself ✔ Children can build themselves ✔ Will not allow invalid auth modes ✔ Can set a custom api client ✔ Wont call a nonexisting auth strat ✔ Supports no auth ✔ Supports XAPI Token auth ✔ Supports custom auth strategies ✔ Uses the laravel env polyfill ✔ Generate o auth 2 token options throws logic exception ✔ Generate passkey options throws logic exception

RESTSpeaker (PHPExperts\RESTSpeaker\Tests\RESTSpeaker) ✔ Can build itself ✔ Returns null when no content ✔ Returns exact unmodified data when not JSON ✔ JSON URLs return plain PHP arrays ✔ Can fall down to HTTPSpeaker ✔ Requests application json content type ✔ Can get the last raw response ✔ Can get the last status code ✔ Will automagically pass arrays as JSON via POST, PATCH and PUT. ✔ Will automagically pass objects as JSON via POST, PATCH and PUT. ✔ Implements Guzzle's PSR-18 ClientInterface interface. * ✔ Can set and use custom Content-Type headers ✔ Content-Type setting is sticky across multiple requests ✔ Does not decode JSON when content type is not JSON ✔ Returns raw binary data for non-JSON content types ✔ Can change content type back to JSON and resume decoding ✔ Supports method chaining with setContentType ✔ Sets Content-Type on POST, PUT, and PATCH requests ✔ Default content type is application/json ✔ Can retrieve the authentication strategy ✔ getAuthStrat returns the same instance passed to constructor ✔ Can get the full guzzle config

Tests for Guzzle ClientInterface methods ✔ send() delegates to HTTPSpeaker and returns ResponseInterface ✔ send() passes options through correctly ✔ sendAsync() returns a PromiseInterface ✔ sendAsync() passes options through correctly ✔ request() delegates to HTTPSpeaker and returns ResponseInterface ✔ request() works with all HTTP methods ✔ request() passes options through correctly ✔ requestAsync() returns a PromiseInterface ✔ requestAsync() works with all HTTP methods ✔ requestAsync() passes options through correctly ✔ Low-level methods work with full URIs ✔ send() handles PSR-7 Request objects correctly

Testing

Contributors

Theodore R. Smith [email protected]
GPG Fingerprint: 4BF8 2613 1C34 87AC D28F 2AD8 EB24 A91D D612 5690
CEO: PHP Experts, Inc.

License

MIT license. Please see the license file for more information.


All versions of rest-speaker with dependencies

PHP Build Version
Package Version
Requires php Version >=7.4
ext-curl Version *
ext-json Version *
guzzlehttp/guzzle Version 6.*|7.*
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package phpexperts/rest-speaker contains the following files

Loading the files please wait ...