Error making http request in ruby on rails -


i trying make http request send , sms through kannel using ruby not working,what problem code in method. thanx

require 'net/http'   def self.send_sms( to, from, message)    id = rand(36**8).to_s(36)    uri= uri('http://localhost:13013/cgi-bin/sendsms?')    params = {username: 'skylinesms', password: 'password', from: '#{from}',               text: '#{message}',               'dlr-url': '#{rails.application.routes.url_helpers.deliver_url(:id => id)}',              'dlr-mask': 3             }    uri.query = uri.encode_www_form(params)    req = net::http::get.new(uri.to_s)    res = net::http.get_response(uri)    res  end  


Comments

Popular posts from this blog

html - How to style widget with post count different than without post count -

How to remove text and logo OR add Overflow on Android ActionBar using AppCompat on API 8? -

javascript - storing input from prompt in array and displaying the array -