Explorar o código

allow to specify uri

Nicolas Cannasse %!s(int64=17) %!d(string=hai) anos
pai
achega
cd77658a3e
Modificáronse 1 ficheiros con 2 adicións e 2 borrados
  1. 2 2
      std/mtwin/web/Request.hx

+ 2 - 2
std/mtwin/web/Request.hx

@@ -31,8 +31,8 @@ class Request {
 	var pathInfoParts  : Array<String>;
 	var params         : Hash<String>;
 
-	public function new() {
-		pathInfoParts = Web.getURI().split( "/" );
+	public function new( ?uri ) {
+		pathInfoParts = (uri == null ? neko.Web.getURI() : uri).split( "/" );
 		pathInfoParts.shift();
 		params = Web.getParams();
 	}