How do I use rest-client for ruby to post an image?
Posted
by Angela
on Stack Overflow
See other posts from Stack Overflow
or by Angela
Published on 2010-05-19T05:49:56Z
Indexed on
2010/05/19
6:00 UTC
Read the original article
Hit count: 266
rest-client
I am trying to find a way to use the Postful API and I need to post an image in the body of the request. I am trying to use rest-client (but am open to other ways):
This is how I am trying to use it after looking at the restclient.rb file but I'm still not clear:
class ContactPostfulsController < ApplicationController
require 'rest_client'
RestClient.post 'http://www.postful.com/service/upload', 'the actual image...?',
:content_type => 'application/octet-stream'
end
© Stack Overflow or respective owner