Method: Puppet::Network::HTTP::Route#process

Defined in:
lib/puppet/network/http/route.rb

#process(request, response) ⇒ Object



79
80
81
82
83
84
85
86
87
88
89
90
# File 'lib/puppet/network/http/route.rb', line 79

def process(request, response)
  handlers = @method_handlers[request.method.upcase.intern] || NO_HANDLERS
  handlers.each do |handler|
    handler.call(request, response)
  end

  subrequest = request.route_into(match(request.routing_path).to_s)
  chained_route = @chained.find { |route| route.matches?(subrequest) }
  if chained_route
    chained_route.process(subrequest, response)
  end
end