I want to use Alamofire.request.validate() to validate http status code and return error If It doesn't pass the rule. As you know, It default check if It is 2xx. However, I want to add also HTTP 500. I tried to do
Alamofire.request.validate().validate(500) but It doesn't work. In addition, because It accept sequence only, I can't use || operator. How can I achieve this? Thank you.
I got help from below post but can't find anything about my problem.
What is the use of the validate() method in Alamofire.request?