소스 검색

allow to specify uri

Nicolas Cannasse 17 년 전
부모
커밋
cd77658a3e
1개의 변경된 파일2개의 추가작업 그리고 2개의 파일을 삭제
  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();
 	}