Skip to content

Latest commit

 

History

History
56 lines (36 loc) · 1.16 KB

File metadata and controls

56 lines (36 loc) · 1.16 KB

Usage

Configure your Adapter

Max redirects

By default the bundle configures every adapter to follow 5 redirections. But you can refine this value in order to match your project needs.

For example, if you want your application to follow 10 redirections, then you can use the following configuration:

widop_http_adapter:
    max_redirects: 10

If you want to disable the redirect feature, simply set it to zero.

Request your Adapter

In order to use an adapter, you need to request the associated service:

cURL

$curlHttpAdapter = $this->container->get('widop_http_adapter.curl');

Stream

$streamHttpAdapter = $this->container->get('widop_http_adapter.stream');

Buzz

$buzzHttpAdapter = $this->container->get('widop_http_adapter.buzz');

Guzzle

$guzzleHttpAdapter = $this->container->get('widop_http_adapter.guzzle');

Zend

$zendHttpAdapter = $this->container->get('widop_http_adapter.zend');

Make a GET/POST request

Each adapter allows you to make a GET or POST request. Everything is explained here.