我想检查用户名和密码。我正在使用mLab API。只检查带有查询的用户名是否有效,但是当我也添加密码时。它不起作用(我是否给出了错误的值,它返回OK(HTTP 200))。
API文档;
http://docs.mlab.com/data-api/
let parameters: Parameters = ["q" : "{\"uname\" :\"\(tfUsername.text as! String)\" }, {\"password\" :\"\(tfPass.text as! String)\"}", "apiKey": "2ABdhQTy1GAWiwfvsKfJyeZVfrHeloQI"]
Alamofire.request("https://api.mlab.com/api/1/databases/mysignal/collections/Cusers", method: .get, parameters: parameters,encoding: URLEncoding.default, headers: nil).responseData{ response in
print(response.response?.statusCode)