examples/echo.rb in goliath-1.0.2 vs examples/echo.rb in goliath-1.0.3
- old
+ new
@@ -16,10 +16,10 @@
use Goliath::Rack::Heartbeat # respond to /status with 200, OK (monitoring, etc)
# If you are using Golaith version <=0.9.1 you need to Goliath::Rack::ValidationError
# to prevent the request from remaining open after an error occurs
#use Goliath::Rack::ValidationError
- use Goliath::Rack::Validation::RequestMethod, %w(GET POST) # allow GET and POST requests only
+ use Goliath::Rack::Validation::RequestMethod, %w(GET POST PATCH) # allow GET, POST and PATCH requests only
use Goliath::Rack::Validation::RequiredParam, {:key => 'echo'} # must provide ?echo= query or body param
plugin Goliath::Plugin::Latency # output reactor latency every second
def process_request