0
Alamofire 3와 함께 Swift 2.2에서 Basic Auth를이 API 요청에 어떻게 추가 할 수 있습니까?Drupal 7에 대한 REST 호출을 위해 Swith 2.2 Alamofire3 API 요청에 Basic Auth를 추가하는 방법은 무엇입니까?
let voteEndpoint: String = "https://www.example.com/rest/votingapi/set_votes"
let newVote = ["votes":["value":40, "uid":1, "entity_id":108]]
Alamofire.request(.POST, voteEndpoint, parameters: newVote, encoding: .JSON)
.response { request, response, data, error in
print(request)
print (response)
print (error)
}
카일 감사합니다! –