Skip to content

Commit

Permalink
Merge pull request #6 from L-Eugene/master
Browse files Browse the repository at this point in the history
Fix gzip response processing
  • Loading branch information
bodrovis committed Aug 23, 2023
2 parents e26b8ea + d0a749c commit bd65f2c
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions lib/rating_chgk_v2/connection.rb
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,10 @@ def options(client)
headers = {
accept: 'application/json',
user_agent: "rating-chgk-v2 gem/#{RatingChgkV2::VERSION}",
'Content-Type': 'application/json',
accept_encoding: 'gzip,deflate,br'
'Content-Type': 'application/json'
}

headers = headers.merge({Authorization: "Bearer #{client.token}"}) if client.token
headers = headers.merge({Authorization: "Bearer #{client.token}"}) unless client.token.to_s.empty?

{headers: headers, url: BASE_URL}
end
Expand Down

0 comments on commit bd65f2c

Please sign in to comment.