{"id":13531561,"url":"https://github.com/bodrovis/faraday-gzip","last_synced_at":"2025-08-03T11:31:47.093Z","repository":{"id":56845541,"uuid":"455257970","full_name":"bodrovis/faraday-gzip","owner":"bodrovis","description":"The Gzip middleware for Faraday 1 and 2 adds the necessary Accept-Encoding headers and automatically decompresses the response","archived":false,"fork":false,"pushed_at":"2024-11-01T20:47:10.000Z","size":32,"stargazers_count":10,"open_issues_count":0,"forks_count":2,"subscribers_count":4,"default_branch":"master","last_synced_at":"2024-12-03T19:51:26.372Z","etag":null,"topics":["faraday","gem","ruby"],"latest_commit_sha":null,"homepage":"","language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/bodrovis.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-02-03T17:16:38.000Z","updated_at":"2024-11-21T18:12:58.000Z","dependencies_parsed_at":"2023-12-26T20:24:02.584Z","dependency_job_id":"1751b293-68ae-4f62-9819-5f01dfd01a7e","html_url":"https://github.com/bodrovis/faraday-gzip","commit_stats":{"total_commits":23,"total_committers":3,"mean_commits":7.666666666666667,"dds":"0.21739130434782605","last_synced_commit":"e2a8389b5e5df92c372d7a586e9f8c889b561141"},"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bodrovis%2Ffaraday-gzip","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bodrovis%2Ffaraday-gzip/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bodrovis%2Ffaraday-gzip/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bodrovis%2Ffaraday-gzip/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bodrovis","download_url":"https://codeload.github.com/bodrovis/faraday-gzip/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":228540830,"owners_count":17934029,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["faraday","gem","ruby"],"created_at":"2024-08-01T07:01:03.978Z","updated_at":"2025-08-03T11:31:47.081Z","avatar_url":"https://github.com/bodrovis.png","language":"Ruby","funding_links":[],"categories":["Middleware"],"sub_categories":[],"readme":"# Faraday Gzip\n\n![CI](https://github.com/bodrovis/faraday-gzip/actions/workflows/ci.yaml/badge.svg)\n[![Gem](https://img.shields.io/gem/v/faraday-gzip.svg?style=flat-square)](https://rubygems.org/gems/faraday-gzip)\n![Gem Total Downloads](https://img.shields.io/gem/dt/faraday-gzip)\n[![Maintainability](https://qlty.sh/badges/e6c44939-e581-4e4a-9ce0-6bdcbeb41dce/maintainability.svg)](https://qlty.sh/gh/bodrovis/projects/faraday-gzip)\n[![Code Coverage](https://qlty.sh/badges/e6c44939-e581-4e4a-9ce0-6bdcbeb41dce/test_coverage.svg)](https://qlty.sh/gh/bodrovis/projects/faraday-gzip)\n\nThe `Gzip` middleware for Faraday 1 and 2 adds the necessary `Accept-Encoding` headers and automatically decompresses the response. If the \"Accept-Encoding\" header isn't set in the request, it defaults to `gzip,deflate` and appropriately handles the server's compressed response. This functionality resembles what Ruby does internally in `Net::HTTP#get`. If [Brotli](https://github.com/miyucy/brotli) is included in your Gemfile, the middleware also adds `br` to the header for Brotli support.\n\n## Prerequisites\n\n* faraday-gzip v3 supports only Faraday v2 and is tested with Ruby 3.0+ and JRuby 9.4+\n* [faraday-gzip v2](https://github.com/bodrovis/faraday-gzip/tree/v2) supports Faraday v1 and v2 and is tested with Ruby 2.7+ and JRuby 9.4.\n\n## Installation\n\nAdd this line to your application's Gemfile:\n\n```ruby\ngem 'faraday-gzip', '~\u003e 3'\n```\n\nAnd then execute:\n\n```\nbundle install\n```\n\nOr install it yourself as:\n\n```\ngem install faraday-gzip\n```\n\n## Usage\n\nTo enable the middleware in your Faraday connection, add it as shown below:\n\n```ruby\nrequire 'faraday/gzip' # \u003c=== Add this line\n\nconn = Faraday.new(...) do |f|\n  f.request :gzip # \u003c=== Add this line\n  # Additional configuration...\nend\n```\n\n## Development\n\nTo contribute or make changes:\n\n* Clone the repo\n* Run `bundle` to install dependencies\n* Implement your feature\n* Write and run tests using `rspec .`\n* Use rake build to build the gem locally if needed\n* Create a new PR with your changes\n\n## Contributing\n\nBug reports and pull requests are welcome on GitHub.\n\n## License\n\nThis gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbodrovis%2Ffaraday-gzip","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbodrovis%2Ffaraday-gzip","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbodrovis%2Ffaraday-gzip/lists"}