https://github.com/toshimaru/redirect_follow_get
redirect_follow_get is simple http get method following redirect.
https://github.com/toshimaru/redirect_follow_get
Last synced: about 1 year ago
JSON representation
redirect_follow_get is simple http get method following redirect.
- Host: GitHub
- URL: https://github.com/toshimaru/redirect_follow_get
- Owner: toshimaru
- License: mit
- Created: 2016-12-15T15:30:44.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2017-01-21T06:03:41.000Z (over 9 years ago)
- Last Synced: 2024-10-07T05:08:52.426Z (over 1 year ago)
- Language: Ruby
- Homepage:
- Size: 14.6 KB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE.txt
Awesome Lists containing this project
README
# redirect_follow_get
[](https://travis-ci.org/toshimaru/redirect_follow_get)
[](https://badge.fury.io/rb/redirect_follow_get)
[](https://codecov.io/gh/toshimaru/redirect_follow_get)
`redirect_follow_get` is simple http get method following redirect. It wraps `net/http` library.
## Installation
Add this line to your application's Gemfile:
```ruby
gem 'redirect_follow_get'
```
And then execute:
$ bundle
Or install it yourself as:
$ gem install redirect_follow_get
## Usage
`redirect_follow_get` returns `Net::HTTPOK` when the request gets 200 response.
```rb
response = redirect_follow_get('http://google.com/')
# => #
response.code
# => "200"
response.uri
# => #
response.body
# => "