Sends either sync or async request based on async option.
public request ( string $method = 'GET', string $uri = '', array $payload = [], array $headers = [] ) : |
||
$method | string | |
$uri | string | |
$payload | array | - either used as the request body or url query params |
$headers | array | |
리턴 | Promise or Response depending on sync or async request |