mirror of
https://github.com/symfony/recipes-contrib.git
synced 2026-09-12 07:36:34 +03:00
Merge pull request #328
This commit is contained in:
@@ -0,0 +1,41 @@
|
||||
# Read more about client options at: https://github.com/kriswallsmith/Buzz/blob/master/doc/client.md
|
||||
services:
|
||||
_defaults:
|
||||
public: false
|
||||
|
||||
# Tell the auto wire system to use "FileGetContents" client as default client.
|
||||
# Set this to any of the other clients below (e.g. Curl or MultiCurl) to use a different default client.
|
||||
Buzz\Client\BuzzClientInterface: '@buzz.file_get_contents_client'
|
||||
|
||||
# Clients
|
||||
buzz.file_get_contents_client:
|
||||
class: Buzz\Client\FileGetContents
|
||||
arguments:
|
||||
- timeout: 10
|
||||
|
||||
buzz.curl_client:
|
||||
class: Buzz\Client\Curl
|
||||
arguments:
|
||||
- timeout: 10
|
||||
|
||||
buzz.multi_curl_client:
|
||||
class: Buzz\Client\MultiCurl
|
||||
arguments:
|
||||
- timeout: 10
|
||||
|
||||
# Browser
|
||||
Buzz\Browser:
|
||||
arguments: ['@Buzz\Client\BuzzClientInterface']
|
||||
calls:
|
||||
- ['addMiddleware', ['@buzz.middleware.content_length']]
|
||||
- ['addMiddleware', ['@buzz.middleware.logger']]
|
||||
|
||||
# Middlewares
|
||||
buzz.middleware.content_length:
|
||||
class: Buzz\Middleware\ContentLengthMiddleware
|
||||
|
||||
buzz.middleware.logger:
|
||||
class: Buzz\Middleware\LoggerMiddleware
|
||||
arguments: ['@?logger']
|
||||
tags:
|
||||
- { name: monolog.logger, channel: buzz }
|
||||
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"copy-from-recipe": {
|
||||
"config/": "%CONFIG_DIR%/"
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user