/GuzzleBundleMiddlewarePlugin

Plugin for EightPointsGuzzleBundle to provider generic middleware

Primary LanguagePHPMIT LicenseMIT

Guzzle Bundle Middleware Plugin

This plugin integrates a generic way to include all middleware.

Requirements

Installation

Using composer:

command line
$ composer require wizbit/guzzle-bundle-middleware-plugin

Usage

Enable bundle

# app/AppKernel.php

new EightPoints\Bundle\GuzzleBundle\EightPointsGuzzleBundle([
    new Wizbit\Bundle\GuzzleBundleMiddlewarePlugin\GuzzleBundleMiddlewarePlugin(),
])

Basic configuration

# app/config/config.yml

eight_points_guzzle:
    clients:
        api_payment:
            base_url: "http://api.domain.tld"

            # define headers, options

            # plugin settings
            plugin:
                middleware:
                    - '@my.middleware.service'