Am trying to add authorization to my header using a return apikey of my login user am trying like this but it seems to not working because am getting an error that apikey is missing (is a return error from the webservices)
 func getFavourites ()
{
    let headers = ["Content-Type": "application/x-www-form-urlencoded", "authorization" : user.apiKey ]
    Alamofire.request("http://localhost:8888/food_pin/v1/restaurantToFavourites", method: HTTPMethod.get,  encoding: URLEncoding.default, headers: headers).responseJSON { (response:DataResponse<Any>) in
        if response.result.value != nil
        {
            print(response.result.value!)
            print(response.response!)
            self.returnAllFavourites(data: response.data!)
        }
        else
        {
            print(response.result.error!)
        }
    }
}
 
    