Details
-
New Feature
-
Status: Resolved
-
Minor
-
Resolution: Fixed
-
2.20.1
-
None
-
Patch Available
-
Novice
-
Patch
Description
When working with rest api's, some http status codes such as 404 Not Found are not necessarily errors. It would be nice to be able to specify multiple ranges and individual codes such as okStatusCodeRange=200-204,404.
This would allow us to handle 404 in the main route logic while still throwing an exception for other status codes. While we can use throwExceptionOnFailure=false we then have to throw exceptions ourselves for most status codes.
As far as I can tell, this requires a simple modification in HttpHelper::isStatusCodeOk.
I will give it a shot.