camel-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Niels Ull Harremoes (JIRA)" <>
Subject [jira] [Commented] (CAMEL-12074) Let okStatusCodeRange support multiple ranges
Date Wed, 13 Dec 2017 21:26:00 GMT


Niels Ull Harremoes commented on CAMEL-12074:

I have made a fix - but I cannot figure out how to do a proper pull request?
I have attached a patch file here.
Could someone please have a look?

Is there a dummies guide to pull requests somewhere? 

> Let okStatusCodeRange support multiple ranges
> ---------------------------------------------
>                 Key: CAMEL-12074
>                 URL:
>             Project: Camel
>          Issue Type: New Feature
>          Components: camel-http, camel-http4
>    Affects Versions: 2.20.1
>            Reporter: Niels Ull Harremoes
>            Priority: Minor
>   Original Estimate: 3h
>  Remaining Estimate: 3h
> 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.

This message was sent by Atlassian JIRA

View raw message