tsaleh (owner)

Revisions

gist: 127403 Download_button fork
public
Public Clone URL: git://gist.github.com/127403.git
service.rb
1
2
3
4
5
6
7
8
9
10
11
    def post_form_with_net_http(url,params)
      Net::HTTP.post_form(url, params)
    end
    
    def post_form_with_curl(url,params,multipart=false)
      response = Curl::Easy.http_post(url.to_s, *to_curb_params(params)) do |c|
        c.multipart_form_post = multipart
        c.timeout = Facebooker.timeout
      end
      response.body_str
    end