From e3b8b84dc12ccf79e9e7e1f8d183fd73ef7c880b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Norbertas=20Kasparovi=C4=8Dius?= Date: Wed, 9 Sep 2020 09:57:31 +0300 Subject: [PATCH 1/2] SUPPORT-23536 Add support binary/octet-stream response body --- .../Bundle/CodeGeneratorBundle/Service/BodyResolver.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/Paysera/Bundle/CodeGeneratorBundle/Service/BodyResolver.php b/src/Paysera/Bundle/CodeGeneratorBundle/Service/BodyResolver.php index 8994c89..c4d5afd 100644 --- a/src/Paysera/Bundle/CodeGeneratorBundle/Service/BodyResolver.php +++ b/src/Paysera/Bundle/CodeGeneratorBundle/Service/BodyResolver.php @@ -17,6 +17,7 @@ class BodyResolver const BODY_JSON = 'application/json'; const BODY_JAVASCRIPT = 'application/javascript'; const BODY_OCTET_STREAM = 'application/octet-stream'; + const BODY_BINARY_OCTET_STREAM = 'binary/octet-stream'; /** * @param Method $method @@ -60,6 +61,10 @@ public function getResponseBody(Method $method) return $okResponse->getBodyByType(self::BODY_OCTET_STREAM); } catch (Exception $exception) {} + try { + return $okResponse->getBodyByType(self::BODY_BINARY_OCTET_STREAM); + } catch (Exception $exception) {} + throw new Exception('No body found'); } From 4f566d26292fffac13353f98b424007fe2a85d10 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Norbertas=20Kasparovi=C4=8Dius?= Date: Wed, 9 Sep 2020 10:02:03 +0300 Subject: [PATCH 2/2] Changelog --- CHANGELOG.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index d6284ed..fc31752 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,10 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html). +## 11.2.1 +### Changed +- Add support for binary/octet-stream. + ## 11.2.0 ### Changed - Requires at least PHP 7.2, updates used internal libraries.