ResponseEntity provides static "unprocessableEntity()" convenience method as well
Issue: SPR-12515
This commit is contained in:
@@ -246,6 +246,16 @@ public class ResponseEntity<T> extends HttpEntity<T> {
|
||||
return status(HttpStatus.NOT_FOUND);
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a builder with an
|
||||
* {@linkplain HttpStatus#UNPROCESSABLE_ENTITY UNPROCESSABLE_ENTITY} status.
|
||||
* @return the created builder
|
||||
* @since 4.1.3
|
||||
*/
|
||||
public static HeadersBuilder<?> unprocessableEntity() {
|
||||
return status(HttpStatus.UNPROCESSABLE_ENTITY);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Defines a builder that adds headers to the response entity.
|
||||
|
||||
Reference in New Issue
Block a user