class WEBrick::HTTPServer

Support other methods in HTTPServer

Public Instance Methods

do_DELETE(req, res) click to toggle source
# File lib/ritm/helpers/patches.rb, line 35
def do_DELETE(req, res)
  perform_proxy_request(req, res) do |http, path, header|
    http.delete(path, header)
  end
end
do_OPTIONS(_req, res) click to toggle source

TODO: make sure options gets proxied too (so trace)

# File lib/ritm/helpers/patches.rb, line 54
def do_OPTIONS(_req, res)
  res['allow'] = 'GET,HEAD,POST,PUT,PATCH,DELETE,OPTIONS,CONNECT'
end
do_PATCH(req, res) click to toggle source
# File lib/ritm/helpers/patches.rb, line 47
def do_PATCH(req, res)
  perform_proxy_request(req, res) do |http, path, header|
    http.patch(path, req.body || '', header)
  end
end
do_PUT(req, res) click to toggle source
# File lib/ritm/helpers/patches.rb, line 41
def do_PUT(req, res)
  perform_proxy_request(req, res) do |http, path, header|
    http.put(path, req.body || '', header)
  end
end