Browse Source

allow to specify uri

Nicolas Cannasse 17 năm trước cách đây
mục cha
commit
cd77658a3e
1 tập tin đã thay đổi với 2 bổ sung2 xóa
  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();
 	}