CredStore Perform Query error

前端 未结 12 1642
北荒
北荒 2020-11-27 12:16

I am running into an issue while doing API calls to my apps backend, every connection now prompts with

CredStore - performQuery - Error copying matching cred         


        
12条回答
  •  余生分开走
    2020-11-27 12:47

        let credentialData = "\(user):\(password)".data(using: String.Encoding.utf8)!
        let base64Credentials = credentialData.base64EncodedString(options: [])
        let headers = ["Authorization": "Basic \(base64Credentials)"]
        Alamofire.request(url, method: .get, parameters: params,encoding: URLEncoding.default,headers: headers)
                    .responseJSON{
                response in
                guard let value =  response.result.value else {return}
                        print(value)
         }
    

提交回复
热议问题