How do I send a JSON request in ruby? I have a JSON object but I dont think I can just do .send. Do I have to have javascript send the form?
.send
Or can I us
The net/http api can be tough to use.
require "net/http" uri = URI.parse(uri) Net::HTTP.new(uri.host, uri.port).start do |client| request = Net::HTTP::Post.new(uri.path) request.body = "{}" request["Content-Type"] = "application/json" client.request(request) end