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')); echo $result->getBody(); } }