diff --git a/README.md b/README.md index 0898fe9..e87042a 100644 --- a/README.md +++ b/README.md @@ -70,7 +70,7 @@ Register an event listener and trigger it when needed - **R::runScript(...)** Run R script (if you have R installed) - **HttpClient::cURL(...)** -Run cURL script to send a request (Not completed yet) +Run cURL script to send a request #### Run Web App: - Install docker and docker-compose if needed diff --git a/src/App/HttpClient.php b/src/App/HttpClient.php index fa9aa9c..357e751 100644 --- a/src/App/HttpClient.php +++ b/src/App/HttpClient.php @@ -59,6 +59,7 @@ public static function cURL( CURLOPT_FOLLOWLOCATION => true, CURLOPT_HEADER => true, CURLOPT_HTTPHEADER => $headers, + CURLOPT_HTTPAUTH => $isBasicAuth ? CURLAUTH_ANY : '', CURLOPT_USERPWD => $isBasicAuth ? implode(':', array_values($basicAuth)) : '', CURLOPT_NOBODY => $isBody, CURLOPT_CUSTOMREQUEST => $method,