class WEBrick::HTTPServlet::ProcHandler
Mounts a proc at a path that accepts a request and response.
Instead of mounting this servlet with WEBrick::HTTPServer#mount use WEBrick::HTTPServer#mount_proc:
server.mount_proc '/' do |req, res| res.body = 'it worked!' res.status = 200 end
Public Class Methods
(_Callable proc) → void
Source
# File vendor/bundle/ruby/4.0.0/gems/webrick-1.9.2/sig/httpservlet/prochandler.rbs, line 12
def initialize: (_Callable proc) -> void
Public Instance Methods
(HTTPRequest request, HTTPResponse response) → void
Source
# File vendor/bundle/ruby/4.0.0/gems/webrick-1.9.2/sig/httpservlet/prochandler.rbs, line 14
def do_GET: (HTTPRequest request, HTTPResponse response) -> void
(HTTPServer server, *untyped options) → self
Source
# File vendor/bundle/ruby/4.0.0/gems/webrick-1.9.2/sig/httpservlet/prochandler.rbs, line 10
def get_instance: (HTTPServer server, *untyped options) -> self