Sha256: 48d1383ebb8bb1f68839c2041c0a33578ee1ea6728a9f8cdfcc04ef2243047fe
Contents?: true
Size: 642 Bytes
Versions: 14
Compression:
Stored size: 642 Bytes
Contents
require 'sinatra/base' module Voom module Presenters module Demo # Echo's back post, delete and put # Used to demonstrate how the posts(updates), deletes and modifies actions work. class Echo < Sinatra::Base post('/_echo_') do content_type :json JSON.dump(params) end delete('/_echo_') do content_type :json JSON.dump(params) end put('/_echo_') do content_type :json JSON.dump(params) end # start the server if ruby file executed directly run! if app_file == $0 end end end end
Version data entries
14 entries across 14 versions & 1 rubygems