Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
HTTP Remote call accelerator proxy for Shopify
Ruby
tree: e9998ed0a9

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
examples
lib
README.rdoc
api_proxy.rb

README.rdoc

EM-Proxy

EventMachine Proxy DSL:

Simple port forwarding proxy

Proxy.start(:host => "0.0.0.0", :port => 80) do |conn|
  conn.server :srv, :host => "127.0.0.1", :port => 81

  # modify / process request stream
  conn.on_data do |data|
    p [:on_data, data]
    data
  end

  # modify / process response stream
  conn.on_response do |backend, resp|
    p [:on_response, backend, resp]
    resp
  end
end
Something went wrong with that request. Please try again.