Find file
Fetching contributors…
Cannot retrieve contributors at this time
9 lines (6 sloc) 247 Bytes
require "json"
require "net/http"
client = Net::HTTP.new("localhost", 8080)
File.open("names.txt").each_line do |name|
client.post("/spring-data-rest-webmvc/people", JSON.dump({"name" => name.chomp}), {"Content-Type"=>"application/json"})
end