$client = new Client(
[
'timeout' => 5.0,
'connect_timeout' => 2.0,
'read_timeout' => 2.0
]
);
$response = $client->post(
...,
[
.....
]
);
return $response->getStatusCode();