From f47b3fef4e9f81958c63d9bdd866d416c9db9492 Mon Sep 17 00:00:00 2001 From: Shady Khattab Date: Fri, 1 Dec 2017 11:09:31 +0100 Subject: [PATCH] :bug: Add jsonapi accept header when posting resources --- src/MyParcelComApi.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/MyParcelComApi.php b/src/MyParcelComApi.php index da1f3c45..664cd2d3 100644 --- a/src/MyParcelComApi.php +++ b/src/MyParcelComApi.php @@ -621,7 +621,9 @@ protected function postResource(ResourceInterface $resource) 'post', $this->getResourceUri($resource->getType()), [ - RequestOptions::HEADERS => $this->authenticator->getAuthorizationHeader(), + RequestOptions::HEADERS => $this->authenticator->getAuthorizationHeader() + [ + AuthenticatorInterface::HEADER_ACCEPT => AuthenticatorInterface::MIME_TYPE_JSONAPI, + ], RequestOptions::JSON => ['data' => $resource], ] )->then(function (ResponseInterface $response) {