I found that alamofire adds the following headers:
Accept-Language: en; q = 1.0
Accept-Encoding: gzip; q = 1.0, compress; q = 0.5
q = the part was the problematic part, and what caused my server to return an error.
, Accept-Language Accept-Encoding, . q = .
headers["Accept-Language"] = "en"
headers["Accept-Encoding"] = "gzip"
, , -.