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>
on 2012-06-21 08:19
on 2012-06-21 09:40
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 <
Please log in before posting. Registration is free and takes only a minute.
Existing account
(Switch to SSL-encrypted connection)
NEW: Do you have a Google/GoogleMail or Yahoo account? No registration required!
Log in with Google account | Log in with Yahoo account
Log in with Google account | Log in with Yahoo account
No account? Register here.