请求方式:POST
接口版本: 5.2.3
接口描述:
var url = "https://api-v2.1dq.com/v5/Files/status.json" var httpArg = "file_id=signed-6186f745be1744bbf4a1a79a9ebb6d3d-6141d75a-0001" APISTORE(url, httpArg: httpArg) func APISTORE(httpUrl: String, httpArg: String) { var req = NSMutableURLRequest(URL: NSURL(string: httpUrl + "?" + httpArg)!) req.timeoutInterval = 6 req.HTTPMethod = "GET" NSURLConnection.sendAsynchronousRequest(req, queue: NSOperationQueue.mainQueue()) { (response, data, error) -> Void in let res = response as! NSHTTPURLResponse println(res.statusCode) if let e = error{ println("请求失败") } if let d = data { var content = NSString(data: d, encoding: NSUTF8StringEncoding) println(content) } } }