1
GCDWebServer *_webServer = [[GCDWebServer alloc] init];
[_webServer addHandlerForMethod:@"GET"
                           path:@"/"
                   requestClass:[GCDWebServerRequest class] 
     processBlock:^GCDWebServerResponse(GCDWebServerRequest request){
                       NSURL *url = [NSURL URLWithString:@"index.html" relativeToURL:request.URL];
                       return [GCDWebServerResponse responseWithRedirect:url permanent:NO]; 
                   }];

试了很多方法,都传不上参数。</p>

重定向到 index.html 后,如何向 index.html 传递参数???

4

0 回答 0