Reputation: 1184
when passing header and params: Alamofire.AFError.URLRequestValidationFailureReason.bodyDataInGETRequest(0 bytes)
AF.request(urlString,method:.get, parameters: parameters, encoding: URLEncoding.httpBody, headers: headers).responseJSON { response in
print(response)
}
Upvotes: 0
Views: 1566
Reputation: 12770
As of Apple's 2019 OS versions, trying to make a GET request with body data will fail with an error. The value must be nil
. Alamofire provides it's own error here in order to provide a consistent experience for Alamofire users, regardless of which OS their code is running on.
Upvotes: 1