Class: WEBrick::HTTPServer
- Inherits:
-
Object
- Object
- WEBrick::HTTPServer
show all
- Defined in:
- lib/ritm/helpers/patches.rb
Overview
Support other methods in HTTPServer
Instance Method Summary
collapse
Instance Method Details
#do_DELETE(req, res) ⇒ Object
30
31
32
33
34
|
# File 'lib/ritm/helpers/patches.rb', line 30
def do_DELETE(req, res)
perform_proxy_request(req, res) do |http, path, |
http.delete(path, )
end
end
|
#do_OPTIONS(_req, res) ⇒ Object
TODO: make sure options gets proxied too (so trace)
49
50
51
|
# File 'lib/ritm/helpers/patches.rb', line 49
def do_OPTIONS(_req, res)
res['allow'] = 'GET,HEAD,POST,PUT,PATCH,DELETE,OPTIONS,CONNECT'
end
|
#do_PATCH(req, res) ⇒ Object
42
43
44
45
46
|
# File 'lib/ritm/helpers/patches.rb', line 42
def do_PATCH(req, res)
perform_proxy_request(req, res) do |http, path, |
http.patch(path, req.body || '', )
end
end
|
#do_PUT(req, res) ⇒ Object
36
37
38
39
40
|
# File 'lib/ritm/helpers/patches.rb', line 36
def do_PUT(req, res)
perform_proxy_request(req, res) do |http, path, |
http.put(path, req.body || '', )
end
end
|