阅读(4390) (7)

Laravel 8 认证

2021-07-05 10:24:27 更新

你可以使用 withBasicAuthwithDigestAuth 方法来分别指定使用 basic 或是 digest 认证方式:

// Basic 认证
$response = Http::withBasicAuth('[email protected]', 'secret')->post(...);

// Digest 认证
$response = Http::withDigestAuth('[email protected]', 'secret')->post(...);