Closed DesRodman closed 4 years ago
Simply add the Authorization header to your request:
// POST with special headers
$curl = new curl\Curl();
$response = $curl->setHeaders([
'Accept' => 'application/json',
'Authorization' => 'Basic '. base64_encode("login:pass")
])
->get('http://127.0.0.1/api/request');
Cool news. But its not working(
Hello team I'm making next curl request in cmd
curl -i -H "Accept: application/json" -H "Content-Type: application/json" --anyauth -u login:pass http://127.0.0.1/api/request
but how can i send such request with your extension?
Thanks