http-client
時(shí)會(huì)自動(dòng)跟隨重定向,我這里想手動(dòng)處理重定向.Location
來(lái)完成Request
中 guardMax
函數(shù)似乎在超出次數(shù)之后只會(huì)拋出異常allow_redirects
配置,結(jié)果會(huì)是超出 max
后直接拋出異常而不會(huì)繼續(xù)處理請(qǐng)求操作系統(tǒng): Windows
Workerman版本: 5.0
http-client: 2.2
$http -> request('https://example.com/', [
'method' => 'POST',
'version' => '1.1',
'allow_redirects' => [
'max' => 1
],
// --snip--
]);