behrangsa opened a new pull request #145: Added family property
URL: https://github.com/apache/httpcomponents-core/pull/145
 
 
   ***NOTE***: The added code is taken almost verbatim from 
https://github.com/jax-rs/api/blob/master/jaxrs-api/src/main/java/javax/ws/rs/core/Response.java.
   
   ---
   
   It is common in apps that use HTTP clients to check if a response status 
code is 2xx, 3xx, 4xx, 5xx, etc. and conditionally execute code based on that.
   
   Spring's 
[HttpStatus](https://docs.spring.io/spring-framework/docs/current/javadoc-api/org/springframework/http/HttpStatus.html)
 for example, provides these methods:
   
   ```
   public boolean is1xxInformational()
   public boolean is2xxSuccessful()
   public boolean is3xxRedirection()
   public boolean is4xxClientError()
   public boolean is5xxServerError()
   ```
   
   as well as
   
   ```
   public HttpStatus.Series series()
   ```
   
   which returns an instance of 
[HttpStatus.Series](https://docs.spring.io/spring-framework/docs/current/javadoc-api/org/springframework/http/HttpStatus.Series.html).
   
   If I am not mistaken, HTTP Components does not have a similar feature, hence 
the code in this PR *(which is is taken almost verbatim from 
https://github.com/jax-rs/api/blob/master/jaxrs-api/src/main/java/javax/ws/rs/core/Response.java)*.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to