Symfony seems to not respect the HttpClient timeout option when setting the timeout option and when the requestUrl
is a non-existing links. The timeout I set is 2 seconds but the request fails after 5-6 seconds.
$response = $this->request('POST', $requestUrl,
[
'json' => [
"client_id" => "administration",
"grant_type"=>"password",
"username"=>$shop->getUsername(),
"password"=>$shop->getPassword(),
"scope" => "user-verified"
],
'max_duration' => 2,
'timeout' => 2
]
);
Is there any other option I have to set in order to control this behavior ?