Skip to content

Commit

Permalink
Add missing Accept header. Improve UserAgent.
Browse files Browse the repository at this point in the history
  • Loading branch information
Benjamin Laugueux committed Jul 25, 2014
1 parent 9fda6cb commit cb679a1
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/Openl10n/Sdk/Api.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,11 @@ public function __construct(Config $config)
$this->client = new Client([
'base_url' => ['{scheme}://{hostname}:{port}/api/', $options->toArray()],
'defaults' => [
'auth' => [$config->getLogin(), $config->getPassword()]
'auth' => [$config->getLogin(), $config->getPassword()],
'headers' => [
'Accept' => 'application/json',
'User-Agent' => 'Openl10n '.Client::getDefaultUserAgent()
]
]
]);

Expand Down

0 comments on commit cb679a1

Please sign in to comment.