Skip to content

Commit 8298645

Browse files
committed
move HttpMethodsClient to implementation in utils, rename psr client to simply client
1 parent 901d539 commit 8298645

File tree

3 files changed

+33
-176
lines changed

3 files changed

+33
-176
lines changed

src/HttpClient.php

Lines changed: 33 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,42 @@
22

33
namespace Http\Client;
44

5+
use Http\Client\Exception\BatchException;
6+
use Psr\Http\Message\RequestInterface;
7+
use Psr\Http\Message\ResponseInterface;
8+
59
/**
6-
* Interface for both HTTP Client type
10+
* Sends one or more PSR-7 Request and returns PSR-7 responses.
711
*
8-
* @author Márk Sági-Kazár [email protected]>
12+
* @author GeLo <[email protected]>
13+
* @author Márk Sági-Kazár <[email protected]>
14+
* @author David Buchmann <[email protected]>
915
*/
10-
interface HttpClient extends HttpPsrClient, HttpMethodsClient
16+
interface HttpClient
1117
{
18+
/**
19+
* Sends a PSR request
20+
*
21+
* @param RequestInterface $request
22+
*
23+
* @return ResponseInterface
24+
*
25+
* @throws Exception
26+
*/
27+
public function sendRequest(RequestInterface $request);
1228

29+
/**
30+
* Sends PSR requests
31+
*
32+
* If one or more requests led to an exception, the BatchException is thrown.
33+
* The BatchException also gives access to the BatchResult for the successful responses.
34+
*
35+
* @param RequestInterface[] $requests
36+
*
37+
* @return BatchResult If all requests where successful.
38+
*
39+
* @throws Exception
40+
* @throws BatchException
41+
*/
42+
public function sendRequests(array $requests);
1343
}

src/HttpMethodsClient.php

Lines changed: 0 additions & 132 deletions
This file was deleted.

src/HttpPsrClient.php

Lines changed: 0 additions & 41 deletions
This file was deleted.

0 commit comments

Comments
 (0)