An open API service indexing awesome lists of open source software.

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.

Awesome Lists containing this project

README

          

# redirect_follow_get

[![Build Status](https://travis-ci.org/toshimaru/redirect_follow_get.svg?branch=master)](https://travis-ci.org/toshimaru/redirect_follow_get)
[![Gem Version](https://badge.fury.io/rb/redirect_follow_get.svg)](https://badge.fury.io/rb/redirect_follow_get)
[![codecov](https://codecov.io/gh/toshimaru/redirect_follow_get/branch/master/graph/badge.svg)](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
# => "