-
-
Notifications
You must be signed in to change notification settings - Fork 120
Expand file tree
/
Copy pathSender.php
More file actions
30 lines (24 loc) · 629 Bytes
/
Sender.php
File metadata and controls
30 lines (24 loc) · 629 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
<?php
declare(strict_types=1);
namespace Saloon\Contracts;
use Saloon\Http\Response;
use Saloon\Http\PendingRequest;
use Saloon\Data\FactoryCollection;
use GuzzleHttp\Promise\PromiseInterface;
interface Sender
{
/**
* Get the factory collection
*/
public function getFactoryCollection(): FactoryCollection;
/**
* Send the request synchronously
*
* @return Response<mixed>
*/
public function send(PendingRequest $pendingRequest): Response;
/**
* Send the request asynchronously
*/
public function sendAsync(PendingRequest $pendingRequest): PromiseInterface;
}