Ответ 1
require 'net/http'
port = 8080
host = "127.0.0.1"
path = "/Application?key=apikey&id=id&option=enable"
req = Net::HTTP::Put.new(path, initheader = { 'Content-Type' => 'text/plain'})
req.body = "whatever"
response = Net::HTTP.new(host, port).start {|http| http.request(req) }
puts response.code
Ответ Ларри помог мне указать в правильном направлении. Немного больше копания помогли мне найти более элегантное решение, руководствуясь этим ответом.
http = Net::HTTP.new('www.mywebsite.com', port)
response = http.send_request('PUT', '/path/from/host?id=id&option=enable|disable')