module Sinatra::WebDAV
Sinatra::WebDAV
¶ ↑
This extensions provides WebDAV
verbs, as defined by RFC 4918 (tools.ietf.org/html/rfc4918). To use this in your app, just register
it:
require 'sinatra/base' require 'sinatra/webdav' class Application < Sinatra::Base register Sinatra::WebDAV # Now you can use any WebDAV verb: propfind '/2014/january/21' do 'I have a lunch at 9 PM' end end
You can use it in classic application just by requiring the extension:
require 'sinatra' require 'sinatra/webdav' mkcol '/2015' do 'You started 2015!' end
Public Class Methods
Source
# File lib/sinatra/webdav.rb, line 34 def self.registered(_) Sinatra::Request.include WebDAV::Request end
Public Instance Methods
Source
# File lib/sinatra/webdav.rb, line 86 def copy(path, opts = {}, &bk) route 'COPY', path, opts, &bk end
Source
# File lib/sinatra/webdav.rb, line 85 def mkcol(path, opts = {}, &bk) route 'MKCOL', path, opts, &bk end
Source
# File lib/sinatra/webdav.rb, line 87 def move(path, opts = {}, &bk) route 'MOVE', path, opts, &bk end
Source
# File lib/sinatra/webdav.rb, line 83 def propfind(path, opts = {}, &bk) route 'PROPFIND', path, opts, &bk end
Source
# File lib/sinatra/webdav.rb, line 84 def proppatch(path, opts = {}, &bk) route 'PROPPATCH', path, opts, &bk end
Source
# File lib/sinatra/webdav.rb, line 89 def unlock(path, opts = {}, &bk) route 'UNLOCK', path, opts, &bk end
def lock(path, opts = {}, &bk) route ‘LOCK’, path, opts, &bk end