File tree Expand file tree Collapse file tree 3 files changed +33
-176
lines changed
Expand file tree Collapse file tree 3 files changed +33
-176
lines changed Original file line number Diff line number Diff line change 22
33namespace 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 mark.sagikazar@gmail.com>
12+ * @author GeLo <geloen.eric@gmail.com>
13+ * @author Márk Sági-Kazár <mark.sagikazar@gmail.com>
14+ * @author David Buchmann <mail@davidbu.ch>
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}
Load Diff This file was deleted.
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments