I need to create an HTTP PUT request using ruby.
The request has a JSON body
I was able to generate the JSON body using:
require 'rubygems'
require 'json'
jsonbody = JSON.generate["message"=>"test","user"=>"user1"]
I need to send this PUT request to the url:
require 'open-uri'
url = URI.parse('http://www.data.com?access_token=123')
Can someone please tell me how I can do this in Ruby?