php - Http Basic Authentication using Laravel Curl Library -
i using https://github.com/ixudra/curl curl library laravel know how run below command through curl library;
curl_setopt($process, curlopt_userpwd, $username . ":" . $password);
i need curl url using http basic authentication , cant seem complete using library.
your post quite old, looking same thing. have use method withoption :
$response = curl::to('https://your-url.com') ->withoption('userpwd', 'user:password') ->post();
if want use other curl option, have remove prefix "curlopt_".
Comments
Post a Comment