From 7b81bb6a1d39dbdc60c63d1fbfe0807feec1c771 Mon Sep 17 00:00:00 2001 From: faustbrian Date: Fri, 23 Nov 2018 06:15:00 +0200 Subject: [PATCH] fix: always send the content-type header (#20) * fix: always send the content-type header * chore: 0.1.4 changelog --- CHANGELOG.md | 6 ++++++ src/Connection.php | 1 + 2 files changed, 7 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index d34518f..e3e15a4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,12 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. ## Unreleased +## 0.1.4 - 2018-11-23 + +### Changed: + +- Always send the `Content-Type` header + ## 0.1.3 - 2018-10-31 ### Fixed: diff --git a/src/Connection.php b/src/Connection.php index f3223ef..5ba1baa 100644 --- a/src/Connection.php +++ b/src/Connection.php @@ -58,6 +58,7 @@ public function __construct(array $config, Builder $httpClientBuilder = null) $this->httpClientBuilder->addPlugin(new Plugin\BaseUriPlugin(UriFactoryDiscovery::find()->createUri($config['host']))); $this->httpClientBuilder->addPlugin(new Plugin\HeaderDefaultsPlugin([ 'User-Agent' => 'ark-php-client (https://github.com/ArkEcosystem/php-client)', + 'Content-Type' => 'application/json' ])); $this->httpClientBuilder->addHeaderValue('API-Version', $config['version']);