这是我的端点的样子:extensionMyEndpoint:TargetType{varbaseURL:NSURL{returnNSURL(string:"http://10.0.1.13:5000")!}varpath:String{switchself{case.SearchForNodes(_,_,_):return"/api/search/node/"case.CreateHistoricalEvent(_):return"/api/node/historicalevent/"}}varmethod:Moya.Method{switchself{case.SearchForNo
我正在尝试将我的代码从swift2版本迁移到swift3版本。我无法迁移以下代码部分,也没有找到任何解决方案。我该怎么做?//标记:URLRequestConvertiblepublicvarURLRequest:NSMutableURLRequest{leturlComponent=NSURLComponents(string:Router.baseURL)!urlComponent.path=Router.basePath.stringByAppendingString(path)letmutableURLRequest=NSMutableURLRequest(URL:urlCom
当前代码是:letmutableURLRequest=NSMutableURLRequest(url:URL(string:urlString)!)mutableURLRequest.httpMethod=HTTPMethod.post.rawValueletencodedURLRequest=ParameterEncoding.JSON.encode(mutableURLRequest,parameters:parameters).0letdata=encodedURLRequest.HTTPBody!Alamofire.upload(mutableURLRequest,data:d