Skip to content

Commit

Permalink
Merge pull request #41 from Bandwidth/DX-2425
Browse files Browse the repository at this point in the history
DX-2425 Fix `get_download_call_recording` to return binary response body
  • Loading branch information
ajrice6713 authored Feb 9, 2022
2 parents 6926499 + 4308ffd commit dca8460
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 12 deletions.
2 changes: 1 addition & 1 deletion bandwidth.gemspec
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Gem::Specification.new do |s|
s.name = 'bandwidth-sdk'
s.version = '9.1.0'
s.version = '9.1.1'
s.summary = 'Bandwidth'
s.description = 'Bandwidth\'s set of APIs'
s.authors = ['APIMatic SDK Generator']
Expand Down
13 changes: 2 additions & 11 deletions lib/bandwidth/voice_lib/voice/controllers/api_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -590,15 +590,9 @@ def get_download_call_recording(account_id,
)
_query_url = APIHelper.clean_url _query_builder

# Prepare headers.
_headers = {
'accept' => 'application/json'
}

# Prepare and execute HttpRequest.
_request = config.http_client.get(
_query_url,
headers: _headers
_query_url
)
VoiceBasicAuth.apply(config, _request)
_response = execute_request(_request)
Expand Down Expand Up @@ -648,11 +642,8 @@ def get_download_call_recording(account_id,
validate_response(_response)

# Return appropriate response type.
decoded = APIHelper.json_deserialize(_response.raw_body) unless
_response.raw_body.nil? ||
_response.raw_body.to_s.strip.empty?
ApiResponse.new(
_response, data: decoded
_response, data: _response.raw_body
)
end

Expand Down

0 comments on commit dca8460

Please sign in to comment.