require 'rubygems' require 'typhoeus' require 'json' while true key = "1230aea77d7bd38898fec74a75a87738dea9f657" testData = {"data" => [rand(0..100)], "key" => "2dbf44a68b77b15bfa5bc3d66c97892a57402bbe"}.to_json testData2 = {"data" => [rand(0..100), rand(0..1000)], "key" => "a46fe0c4dab0453f5d86bed6206040880f59393e"}.to_json puts Typhoeus::Request.post("http://localhost:4567/api/v1/packets", :body=> {:key => key, :payload=>testData}) sleep(rand(0..90)) puts Typhoeus::Request.post("http://localhost:4567/api/v1/packets", :body=> {:key => key, :payload=>testData2}) sleep(rand(0.90)) end