Mercurial > pub > Impl
diff Lib/IMPL/Web/Handler/RestController.pm @ 332:04a093f0a5a6
IMPL::Web::Application refactoring: resources are created per client request
author | cin |
---|---|
date | Sun, 09 Jun 2013 21:48:57 +0400 |
parents | 4abda21186cd |
children | 71221d79e6b4 |
line wrap: on
line diff
--- a/Lib/IMPL/Web/Handler/RestController.pm Wed Jun 05 18:21:11 2013 +0400 +++ b/Lib/IMPL/Web/Handler/RestController.pm Sun Jun 09 21:48:57 2013 +0400 @@ -49,25 +49,24 @@ sub Invoke { - my ($this,$action) = @_; + my ($this,$request) = @_; - my $method = $action->requestMethod; + my $method = $request->requestMethod; - my @segments = $this->GetResourcePath($action); + my @segments = $this->GetResourcePath($request); my $res = $this->resourceFactory->new( id => 'root', - location => Locator->new(base => $action->application->baseUrl), - application => $action->application + request => $request, + location => Locator->new(base => $request->application->baseUrl), ); while(@segments) { my $id = shift @segments; - $res = $res->FetchChildResource($id); } - $res = $res->InvokeHttpVerb($method,$action); + $res = $res->InvokeHttpVerb($method); } 1;