HI All, Got it working using the below script.
*require 'net/http' require "uri" url = "http://#{domain}:#{port}" uri = URI.parse(url); data = File.read('fil_path') #File.read("/usr/test.amr") http = Net::HTTP.new(uri.host, uri.port) request = Net::HTTP::Post.new(uri.request_uri) request.body = data request.content_type = 'audio/amr' res = http.request(request) puts res.body* regards, Loganathan ViewMe <http://vizualize.me/loganathan> On Thu, Jun 21, 2012 at 11:47 AM, Loganathan Sellapa < [email protected]> wrote: > HI All, > > I want to send audio file via http request as an api cal, not via form > using net/http. I dont want to use any other gems. Please let me know how > can be achieved. > > regards, > Loganathan > ViewMe <http://vizualize.me/loganathan> > > > > -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

