Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bump rest-client to 2.1.0 #83

Closed

Conversation

loomchild
Copy link

@loomchild loomchild commented Sep 8, 2024

Allow rest-client dependency 2.1.0.

Closes #55

Related to #43 and #50

rbody = response.body
if headers.keys.any? { |k| k.downcase == 'accept-encoding' } && rheaders[:content_encoding] == 'gzip' && rbody && !rbody.empty?
rbody = Zlib::GzipReader.new(StringIO.new(rbody)).read
end
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Manually decode the gzipped response if Accept-Encoding header was manually set and response containts Content-Encoding: gzip.

Copy link

sonarcloud bot commented Sep 8, 2024

Quality Gate Failed Quality Gate failed

Failed conditions
B Maintainability Rating on New Code (required ≥ A)

See analysis details on SonarCloud

Catch issues before they fail your Quality Gate with our IDE extension SonarLint

@loomchild
Copy link
Author

loomchild commented Sep 8, 2024

Please advise what to do with the above warning (I don't have access to detailed message, so it's not clear to me what is wrong)

@loomchild
Copy link
Author

@cb-alish Please let me know if you need anything else regarding this patch (e.g. supporting deflate, reformating code, etc.)

@cb-sriramthiagarajan
Copy link
Collaborator

Hi @loomchild, my apologies for the delay in response. We'll look into this and come back with any questions / required changes later this. Thanks for your patience.

@cb-sriramthiagarajan
Copy link
Collaborator

Hi @loomchild (and others watching this), we're still looking into this and get back soon.

While we're testing this, one of the approaches that we're thinking is to get rid of rest-client entirely in favour of using Net::HTTP to keep things simple. If you have any feedback on this, please do share. Thanks.

@cb-alish
Copy link
Collaborator

cb-alish commented Nov 5, 2024

Hi @loomchild, could you take a look at #85 when you have a moment? We're transitioning to Net::HTTP with the goal of removing rest-client as a dependency. Just want to make sure everything looks good from your side. Thanks!

@loomchild
Copy link
Author

loomchild commented Nov 5, 2024

I found an alternative solution, so I am no longer waiting for this PR. Unfortunately, I won't find the time right now to test your new solution. Feel free to drop it if it's no longer useful.

@loomchild loomchild closed this Nov 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Use the latest version of rest-client (why a downgrade!?)
3 participants