Download the PHP package hiddeco/laravel-http-adapter without Composer

On this page you can find all versions of the php package hiddeco/laravel-http-adapter. 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 laravel-http-adapter

Laravel HTTP Adapter (DEPRECATED)

Build Status Scrutinizer Code Quality MIT license StyleCI SensioLabsInsight

Laravel HTTP Adapter is officialy deprecated. Use phphttp/laravel based upon httplug instead.

Laravel HTTP Adapter is an Ivory HTTP Adapter bridge, which integrates the ability of using multiple adapters with their own configuration through one API.

Installation

To use this package without running into trouble you will need PHP 5.5+ or HHVM 3.6+, and Composer.

  1. Get the latest version of Laravel HTTP Adapter, add the following line to your composer.json file "hiddeco/laravel-http-adapter": "0.1"

    The package supports the following adapters, you will need to install the ones you want to use.

    • "ext-curl": "*"
    • "ext-http": "*"
    • "guzzle/guzzle": "^3.9.4@dev"
    • "guzzlehttp/guzzle": "^4.1.4|^5.0"
    • "kriswallsmith/buzz": "^0.13"
    • "nategood/httpful": "^0.2.17"
    • "zendframework/zendframework1": "^1.12.9"
    • "zendframework/zend-http": "^2.3.4"
  2. Run composer update or composer install

  3. Register the Laravel HTTP Adapter service provider in config/app.php by adding 'HiddeCo\HttpAdapter\HttpAdapterServiceProvider' to the providers key

  4. Add the HttpAdapter facade to the aliases key: 'HttpAdapter' => 'HiddeCo\HttpAdapter\Facades\HttpAdapter'

Configuration

To manage your HTTP adapters run the php artisan vendor:publish command, this will create the config/httpadapter.php file where you can modify and manage your adapter connections.

The following configuration options are available:

Global Configuration

The Global Configuration (global) overrules all the other configurations set for your HTTP adapters. It accepts the same parameters as an HTTP adapter connection does.

Default Connection Name

The adapter connection name set here (default) is the default connection used for all requests. However, you may use as many connections as you need using the manager class. The default setting is 'main'.

HTTP Adapter Connections

This is the place to configure your HTTP adapter connections (connections). A default configuration with possible options is already present and there is no limit to the amount of connections.

The following adapters are available: buzz, cake, curl, file_get_contents, fopen, guzzle, guzzle_http, httpful, react, socket, zend1 and zend2.

Usage

HTTP Adapter Manager

The HttpAdapterManager is where the magic happens. Bounded to the ioc container as httpadapter and accessible by using the Facade\HttpAdapter facade. It uses parts of the Laravel Manager package to manage the HTTP adapter connections. For more information about the Manager you should check out the respective docs.

It is worth noting the connection returned will always be an instance of \Ivory\HttpAdapter\HttpAdapterInterface. You can find more information about this instance and its methods in the Ivory HTTP Adapter docs.

HTTP Adapter Facade

The HTTP Adapter facade will pass static method calls to the httpadapter object in the ioc container, which as stated before is the HttpAdapterManager class.

Examples

The usage of this package is fairly simple. The main connection is preconfigured and uses the file_get_contents HTTP adapter, no other configuration options are set for this connection by default.

Using the Facade

``

Using the HTTP Adapter Manager

The HTTPAdapterManager returns an instance of \Ivory\HttpAdapter\HttpAdapterInterface and will behave like it. If you want to call a specific connection, you can use the connection method:

``

Changing the default connection and further explanations:

``

Dependency Injection

Prefer the use of a dependency injection over facades? You can easily inject the manager:

``

Events

If you set the eventable key in the general or local HTTP adapter configuration to true the \Ivory\HttpAdapter\EventDispatcherHttpAdapter will be used to make your HTTP adapter connection. This way it's possible to listen to events that are dispatched using the Laravel dispatcher. All available events can be found in the Ivory HTTP docs.

``

It is also possible to register the event listener using the EventServiceProvider.

License

Laravel HTTP Adapter is licensed under the MIT License (MIT).


All versions of laravel-http-adapter with dependencies

PHP Build Version
Package Version
Requires php Version >=5.5.9
illuminate/contracts Version 5.0.*|5.1.*
illuminate/support Version 5.0.*|5.1.*
graham-campbell/manager Version ~2.2
egeloen/http-adapter Version 0.7.1
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 hiddeco/laravel-http-adapter contains the following files

Loading the files please wait ....