Change header from Authorization to X-API-KEY to avoid Apache issues
This commit is contained in:
@@ -19,10 +19,12 @@ class TestApi extends BaseCommand
|
||||
$this->httpClient = new Client([
|
||||
'headers' => [
|
||||
'Authorization' => $this->argument('apikey'),
|
||||
'Content-type' => 'application/json',
|
||||
'X-API-Key' => $this->argument('apikey'),
|
||||
]
|
||||
]);
|
||||
|
||||
$result = $this->httpClient->get($this->argument('url'));
|
||||
print_r(\GuzzleHttp\json_decode($result->getBody()));
|
||||
echo $result->getBody();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user