Free Trial
10 days, no credit_card

<< More Tutorials

How to use rethumb in Ruby?

To use rethumb in Ruby try the following code:

require 'net/http'

Net::HTTP.start("api.rethumb.com") do |http|
    resp = http.get("/v1/width/100/http://factor45.org/images/beach.jpg")
    open("beach.thumb.jpg", "wb") do |file|
        file.write(resp.body)
    end
end

Start using this example now

Use the following commands to get started:

$ git clone https://github.com/rethumb/rethumb-ruby-examples.git
$ cd rethumb-ruby-examples
$ ruby generic.rb

More examples using Ruby