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. 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'); }