Sha256: 9e7913313e75e7adbc5b2d06b650277cce3e736d86cbdf29b8479bfd594f7b05
Contents?: true
Size: 451 Bytes
Versions: 33
Compression:
Stored size: 451 Bytes
Contents
module Oxidized class RestClient require 'net/http' require 'json' HOST = 'localhost' PORT = 8888 class << self def next opt={}, host=HOST, port=PORT web = new host, port web.next opt end end def initialize host=HOST, port=PORT @web = Net::HTTP.new host, port end def next opt data = JSON.dump opt @web.put '/node/next/' + opt[:name].to_s, data end end end
Version data entries
33 entries across 33 versions & 1 rubygems