{"id":17736528,"url":"https://github.com/toshimaru/redirect_follow_get","last_synced_at":"2025-03-31T19:16:55.236Z","repository":{"id":56891440,"uuid":"76571770","full_name":"toshimaru/redirect_follow_get","owner":"toshimaru","description":"redirect_follow_get is simple http get method following redirect.","archived":false,"fork":false,"pushed_at":"2017-01-21T06:03:41.000Z","size":15,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-10-07T05:08:52.426Z","etag":null,"topics":[],"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/toshimaru.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-12-15T15:30:44.000Z","updated_at":"2017-01-05T08:26:44.000Z","dependencies_parsed_at":"2022-08-20T23:40:56.782Z","dependency_job_id":null,"html_url":"https://github.com/toshimaru/redirect_follow_get","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/toshimaru%2Fredirect_follow_get","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/toshimaru%2Fredirect_follow_get/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/toshimaru%2Fredirect_follow_get/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/toshimaru%2Fredirect_follow_get/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/toshimaru","download_url":"https://codeload.github.com/toshimaru/redirect_follow_get/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246523846,"owners_count":20791444,"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":[],"created_at":"2024-10-26T00:23:18.941Z","updated_at":"2025-03-31T19:16:55.215Z","avatar_url":"https://github.com/toshimaru.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# redirect_follow_get\n\n[![Build Status](https://travis-ci.org/toshimaru/redirect_follow_get.svg?branch=master)](https://travis-ci.org/toshimaru/redirect_follow_get)\n[![Gem Version](https://badge.fury.io/rb/redirect_follow_get.svg)](https://badge.fury.io/rb/redirect_follow_get)\n[![codecov](https://codecov.io/gh/toshimaru/redirect_follow_get/branch/master/graph/badge.svg)](https://codecov.io/gh/toshimaru/redirect_follow_get)\n\n`redirect_follow_get` is simple http get method following redirect. It wraps `net/http` library.\n\n## Installation\n\nAdd this line to your application's Gemfile:\n\n```ruby\ngem 'redirect_follow_get'\n```\n\nAnd then execute:\n\n    $ bundle\n\nOr install it yourself as:\n\n    $ gem install redirect_follow_get\n\n## Usage\n\n`redirect_follow_get` returns `Net::HTTPOK` when the request gets 200 response.\n\n```rb\nresponse = redirect_follow_get('http://google.com/')\n# =\u003e #\u003cNet::HTTPOK 200 OK readbody=true\u003e\n\nresponse.code\n# =\u003e \"200\"\nresponse.uri\n# =\u003e #\u003cURI::HTTP http://www.google.co.jp/?gfe_rd=...\u003e\nresponse.body\n# =\u003e \"\u003c!doctype html\u003e\u003chtml ...\n```\n\n### Redirection limit\n\nYou can limit the number of redirects with `limit:` option. **Default redirects limit is 10.**\n\n```rb\nresponse = redirect_follow_get('http://google.com/', limit: 1)\n# RedirectFollowGet::TooManyRedirects: too many HTTP redirects\n```\n\n## Development\n\nAfter checking out the repo, run `bin/setup` to install dependencies. Then, run `rake test` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.\n\nTo install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).\n\n## Contributing\n\nBug reports and pull requests are welcome on GitHub at https://github.com/toshimaru/redirect_follow_get.\n\n## License\n\nThe gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftoshimaru%2Fredirect_follow_get","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftoshimaru%2Fredirect_follow_get","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftoshimaru%2Fredirect_follow_get/lists"}