Browse Source

allow to specify uri

Nicolas Cannasse 17 years ago
parent
commit
cd77658a3e
1 changed files with 2 additions and 2 deletions
  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 pathInfoParts  : Array<String>;
 	var params         : Hash<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();
 		pathInfoParts.shift();
 		params = Web.getParams();
 		params = Web.getParams();
 	}
 	}