I have the same problem and finally fixed. URLEncoding.httpBody did not work for me ... but URLEncoding.default did.
So, I changed JSONEncoding.default to URLEncoding.default .
Now it passes the parameters to the server.
Alamofire.request(loginURL, method: .post, parameters: params, encoding: URLEncoding.default, headers: nil)