Skip to content

Instantly share code, notes, and snippets.

@fractaloop
Created December 7, 2012 23:46
Show Gist options
  • Save fractaloop/4237585 to your computer and use it in GitHub Desktop.
Save fractaloop/4237585 to your computer and use it in GitHub Desktop.

Start the server and send a request.

curl localhost:9000/123

The server will print:

/123/123

require 'goliath'
class HttpProducer < Goliath::API
def response(env)
req = Rack::Request.new(env)
puts req.fullpath,
[200, {}, nil]
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment