Sha256: 281f0572c1cd3f3bc2369197e7d6edb45e0bd81c9eeb78085836d48b330cde6b

Contents?: true

Size: 272 Bytes

Versions: 14

Compression:

Stored size: 272 Bytes

Contents

class VerbServlet < WEBrick::HTTPServlet::AbstractServlet
  %w[HEAD GET POST PUT DELETE].each do |verb|
    eval <<-METHOD
      def do_#{verb}(req, res)
        res.header['X-Request-Method'] = #{verb.dump}
        res.body = #{verb.dump}
      end
    METHOD
  end
end

Version data entries

14 entries across 14 versions & 2 rubygems

Version Path
husc-0.2.1 vendor/bundle/gems/mechanize-2.7.6/lib/mechanize/test_case/verb_servlet.rb
husc-0.2.0 vendor/bundle/gems/mechanize-2.7.6/lib/mechanize/test_case/verb_servlet.rb
husc-0.1.1 vendor/bundle/gems/mechanize-2.7.6/lib/mechanize/test_case/verb_servlet.rb
husc-0.1.0 vendor/bundle/gems/mechanize-2.7.6/lib/mechanize/test_case/verb_servlet.rb
mechanize-2.7.6 lib/mechanize/test_case/verb_servlet.rb
mechanize-2.7.5 lib/mechanize/test_case/verb_servlet.rb
mechanize-2.7.4 lib/mechanize/test_case/verb_servlet.rb
mechanize-2.7.3 lib/mechanize/test_case/verb_servlet.rb
mechanize-2.7.2 lib/mechanize/test_case/verb_servlet.rb
mechanize-2.7.1 lib/mechanize/test_case/verb_servlet.rb
mechanize-2.7.0 lib/mechanize/test_case/verb_servlet.rb
mechanize-2.6.0 lib/mechanize/test_case/verb_servlet.rb
mechanize-2.5.1 lib/mechanize/test_case/verb_servlet.rb
mechanize-2.5 lib/mechanize/test_case/verb_servlet.rb