I'm trying to use the firebase API in swift using Alamofire. I am having trouble adding headers and my request is saying there is an extra argument in my call.
public static func broadcastSyncDo(localId : String){
let headers: HTTPHeaders = [
"Authorization": "key=xxx",
"Content-Type": "application/json"
]
let parameters : [String : String] = [
"to" : "/topics/"+localId,
"content_available" : "1",
"priority" : "high"
]
Alamofire.request(.post, util_Constants.FIREBASE_API, headers : headers, parameters: parameters, encoding: URLEncoding.default)
.responseJSON { response in
print("response : \(response)")
}
}