From 0cffd97365b0be5dbedb22740c8c232671e4819e Mon Sep 17 00:00:00 2001 From: frankfang Date: Wed, 26 Feb 2020 03:22:05 +0800 Subject: [PATCH] fix https://github.com/zipmark/rspec_api_documentation/issues/456 --- lib/rspec_api_documentation/client_base.rb | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/lib/rspec_api_documentation/client_base.rb b/lib/rspec_api_documentation/client_base.rb index d234391b..34c914cf 100644 --- a/lib/rspec_api_documentation/client_base.rb +++ b/lib/rspec_api_documentation/client_base.rb @@ -87,12 +87,8 @@ def headers(method, path, params, request_headers) def record_response_body(response_content_type, response_body) return nil if response_body.empty? - if response_body.encoding == Encoding::ASCII_8BIT - "[binary data]" - else - formatter = RspecApiDocumentation.configuration.response_body_formatter - return formatter.call(response_content_type, response_body) - end + formatter = RspecApiDocumentation.configuration.response_body_formatter + return formatter.call(response_content_type, response_body) end def clean_out_uploaded_data(params, request_body)