class Staccato::Proxy::Sender
Public Class Methods
new(url, debug = false)
click to toggle source
# File lib/staccato/proxy/sender.rb, line 5 def initialize(url, debug = false) @url = url @debug = debug end
Public Instance Methods
debug(msg)
click to toggle source
# File lib/staccato/proxy/sender.rb, line 20 def debug(msg) log(msg) if @debug end
log(msg)
click to toggle source
# File lib/staccato/proxy/sender.rb, line 16 def log(msg) Celluloid.logger.info(msg) end
submit(data)
click to toggle source
# File lib/staccato/proxy/sender.rb, line 10 def submit(data) debug data # data should already be form encoded with `URI.encode_www_form` ::HTTP.post(@url, :body => data, socket_class: Celluloid::IO::TCPSocket) end