diff options
Diffstat (limited to 'Postman/Postman-Mail/mailgun/vendor/php-http/client-common/src/Plugin/HeaderRemovePlugin.php')
-rw-r--r-- | Postman/Postman-Mail/mailgun/vendor/php-http/client-common/src/Plugin/HeaderRemovePlugin.php | 41 |
1 files changed, 0 insertions, 41 deletions
diff --git a/Postman/Postman-Mail/mailgun/vendor/php-http/client-common/src/Plugin/HeaderRemovePlugin.php b/Postman/Postman-Mail/mailgun/vendor/php-http/client-common/src/Plugin/HeaderRemovePlugin.php deleted file mode 100644 index fc9c19d..0000000 --- a/Postman/Postman-Mail/mailgun/vendor/php-http/client-common/src/Plugin/HeaderRemovePlugin.php +++ /dev/null @@ -1,41 +0,0 @@ -<?php - -namespace Http\Client\Common\Plugin; - -use Http\Client\Common\Plugin; -use Psr\Http\Message\RequestInterface; - -/** - * Removes headers from the request. - * - * @author Soufiane Ghzal <sghzal@gmail.com> - */ -final class HeaderRemovePlugin implements Plugin -{ - /** - * @var array - */ - private $headers = []; - - /** - * @param array $headers List of header names to remove from the request - */ - public function __construct(array $headers) - { - $this->headers = $headers; - } - - /** - * {@inheritdoc} - */ - public function handleRequest(RequestInterface $request, callable $next, callable $first) - { - foreach ($this->headers as $header) { - if ($request->hasHeader($header)) { - $request = $request->withoutHeader($header); - } - } - - return $next($request); - } -} |