1
작동하지 않습니다. 나는 인증 헤더 내 자신 추가하는 경우기본 인증은 내가 Alamofire의 기본 인증 지원을 사용하기 위해 노력 해왔다
는 :
let authString = "\(user):\(passwordHashAsHex)"
guard let auth = authString.data(using: String.Encoding.utf8) else {
throw ...
}
request.setValue("Basic \(auth.base64EncodedString())",
forHTTPHeaderField: "Authorization"
)
을 그냥 잘 작동합니다.
Alamofire의 완료/응답 처리기에서 response.request!.allHTTPHeaderFields
을 확인하면 입력 한 내용이 없습니다. Authorization
. 왜 안돼? the documentation의주의 깊게 읽어시