Provides an implementation of the Guzzle Command library that uses Guzzle service descriptions to describe web services, serialize requests, and parse responses into easy to use model structures.
MIT License
253
stars
78
forks
source link
Have default params at client construction, gone away? #100
I just upgraded guzzle and noticed that some tests were failing. Seems this is no longer possible?
public function getClient()
{
$config = $this->getConfig();
$client = new Client( [
'base_url' => $url,
'exceptions' => false,
'defaults' => [
'exceptions' => false,
'query' => [
'auth-userid' => 'common value 1',
'api-key' => 'common value 2',
],
],
] );
return $client;
}
public function doFirst(){
$client = $this->getClient();
$res = $client->get( 'domains/available.json', [
'query' => [
'p1' => 'foo',
'p2' => 'bar',
],
] );
}
Where the client's base parameters would be merged with the get() parameters to create in this case, a 4 parameter request? It was really handy with API calls for instance, where parameters are repeated across various calls.
This looks like an issue for Guzzle itself than an issue for GuzzleServices. Please open a new issue at https://github.com/guzzle/guzzle/issues or reopen the issue if you think it belongs to this project.
I just upgraded guzzle and noticed that some tests were failing. Seems this is no longer possible?
Where the client's base parameters would be merged with the get() parameters to create in this case, a 4 parameter request? It was really handy with API calls for instance, where parameters are repeated across various calls.
Thanks for your guidance!