Change header from Authorization to X-API-KEY to avoid Apache issues

This commit is contained in:
Nabeel Shahzad
2017-12-30 13:31:11 -06:00
parent 41227d3fdb
commit 5e32bcc52d
3 changed files with 12 additions and 8 deletions

View File

@@ -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();
}
}