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
data = {a: {b: [1, 2]}}.to_json uri = URI 'https://myapp.com/api/v1/resource' https = Net::HTTP.new uri.host, uri.port https.use_ssl = true https.post2 uri.path, data, 'Content-Type' => 'application/json'