Sha256: 40a040a6c68a92ce7c2903f5c692658cd717dcc37d45cba68acde58e1c36873c

Contents?: true

Size: 418 Bytes

Versions: 3

Compression:

Stored size: 418 Bytes

Contents

module Jsonatra
  class Base < Sinatra::Base

    class << self

      # because some parameters can be too large for normal GET query strings,
      # all GET routes also accept a POST with body data, with the same parameter
      # names and behavior
      #
      alias_method :sinatra_get, :get
      def get(*args, &block)
        sinatra_get *args, &block
        post *args, &block
      end
    end

  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
jsonatra-1.0.7 lib/jsonatra/break_rest.rb
jsonatra-1.0.5 lib/jsonatra/break_rest.rb
jsonatra-1.0.4 lib/jsonatra/break_rest.rb