Skip to content

Commit a3566c4

Browse files
committed
Adds configurable HTTP adapter interface
1 parent c22c46b commit a3566c4

File tree

1 file changed

+47
-0
lines changed

1 file changed

+47
-0
lines changed

src/ConfigurableHttpAdapter.php

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
<?php
2+
3+
/*
4+
* This file is part of the Http Adapter package.
5+
*
6+
* (c) Eric GELOEN <[email protected]>
7+
*
8+
* For the full copyright and license information, please read the LICENSE
9+
* file that was distributed with this source code.
10+
*/
11+
12+
namespace Http\Adapter;
13+
14+
use Psr\Http\Message\RequestInterface;
15+
use Psr\Http\Message\ResponseInterface;
16+
17+
/**
18+
* @author GeLo <[email protected]>
19+
*/
20+
interface ConfigurableHttpAdapter extends HttpAdapter
21+
{
22+
/**
23+
* Sends a PSR request
24+
*
25+
* @param RequestInterface $request
26+
* @param array $options
27+
*
28+
* @return ResponseInterface
29+
*
30+
* @throws \InvalidArgumentException
31+
* @throws Exception\HttpAdapterException
32+
*/
33+
public function sendRequest(RequestInterface $request, array $options = []);
34+
35+
/**
36+
* Sends PSR requests
37+
*
38+
* @param RequestInterface[] $requests
39+
* @param array $options
40+
*
41+
* @return ResponseInterface[]
42+
*
43+
* @throws \InvalidArgumentException
44+
* @throws Exception\MultiHttpAdapterException
45+
*/
46+
public function sendRequests(array $requests, array $options = []);
47+
}

0 commit comments

Comments
 (0)