/** * Create a new builder with a {@linkplain HttpStatus#CREATED CREATED} status * and a location header set to the given URI. * * @param location the location URI * @return the created builder */ static BodyBuilder created(URI location) { BodyBuilder builder = status(HttpStatus.CREATED); return builder.location(location); }
/** * Create a builder with a {@linkplain HttpStatus#TEMPORARY_REDIRECT 307 Temporary Redirect} * status and a location header set to the given URI. * @param location the location URI * @return the created builder */ static BodyBuilder temporaryRedirect(URI location) { BodyBuilder builder = status(HttpStatus.TEMPORARY_REDIRECT); return builder.location(location); }
/** * Create a builder with a {@linkplain HttpStatus#SEE_OTHER 303 See Other} * status and a location header set to the given URI. * @param location the location URI * @return the created builder */ static BodyBuilder seeOther(URI location) { BodyBuilder builder = status(HttpStatus.SEE_OTHER); return builder.location(location); }
/** * Create a builder with a {@linkplain HttpStatus#PERMANENT_REDIRECT 308 Permanent Redirect} * status and a location header set to the given URI. * @param location the location URI * @return the created builder */ static BodyBuilder permanentRedirect(URI location) { BodyBuilder builder = status(HttpStatus.PERMANENT_REDIRECT); return builder.location(location); }
/** * Create a new builder with a {@linkplain HttpStatus#CREATED 201 Created} status * and a location header set to the given URI. * @param location the location URI * @return the created builder */ static BodyBuilder created(URI location) { BodyBuilder builder = status(HttpStatus.CREATED); return builder.location(location); }