mirror of
https://github.com/guzzle/guzzle.git
synced 2025-01-18 05:48:15 +01:00
commit
a0d75173c8
@ -132,7 +132,7 @@ $handler = GuzzleHttp\HandlerStack::create();
|
||||
$handler->push(Middleware::mapRequest(function (RequestInterface $request) {
|
||||
// Notice that we have to return a request object
|
||||
return $request->withHeader('X-Foo', 'Bar');
|
||||
});
|
||||
}));
|
||||
// Inject the handler into the client
|
||||
$client = new GuzzleHttp\Client(['handler' => $handler]);
|
||||
```
|
||||
|
Loading…
x
Reference in New Issue
Block a user