我对Swift很新,我有一个简单的问题
我以下列方式发送GET请求
loader!.getDataFromRequest(request: NSURLRequest(URL: NSURL(string: "http://......../GetAreaOfOperation?lastCityID=0&batchSize=200")!), dataIndex: -1)
现在我要发送
lastCityID = city // city is an integer which is dynamic
// instead of lastCityID = 0
请帮帮我。
答案 0 :(得分:0)
lastCityID = city
loader!.getDataFromRequest(request: NSURLRequest(URL: NSURL(string: "http://......../GetAreaOfOperation?lastCityID=\(lastCityID)&batchSize=200")!), dataIndex: -1)