Skip to content

Default config (and plugins) #262

Open
@soullivaneuh

Description

@soullivaneuh
Q A
Bug? no
New Feature? yes
Version 1.10.0

Actual Behavior

On each client we configure, we have to define the plugins we want. In case of plugin we want everywhere, we have to repeat the configuration on each of them.

Expected Behavior

The idea is to allow a common client configuration to be applied on each defined client.

With that, we will be able to define common plugin setup with ease. We can also think about it for other option like http_methods_client.

Sample:

httplug:
    default:
        http_methods_client: true
        plugins:
            - 'httplug.plugin.logger'
    clients:
        default:
            factory: 'httplug.factory.guzzle6'
            config:
                timeout: 5
        cacheable:
            factory: 'httplug.factory.guzzle6'
            plugins:
                - 'httplug.plugin.cache'
        dummy:
            factory: 'httplug.factory.guzzle6'
            http_methods_client: false
    profiling:
        captured_body_length: 1000

What do you think?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions