Skip to content

Instantly share code, notes, and snippets.

@coderberry
Created July 17, 2009 23:21
Show Gist options
  • Save coderberry/f0a6d3fd2fcacb0940c9 to your computer and use it in GitHub Desktop.
Save coderberry/f0a6d3fd2fcacb0940c9 to your computer and use it in GitHub Desktop.
require 'net/http'
filename = ARGV[0]
if File.exist?(filename)
promt_id = filename.split("_")[0]
f = File.open(filename)
transcription = f.read
f.close
res = Net::HTTP.post_form(URI.parse('http://wwmg.iqverify.com/webservice/save_dragon'),
{'promt_id' => promt_id, 'transcription' => transcription})
puts res.body
else
puts "File does not exist"
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment