接口的使用
cn.taketoday.http.ResponseEntity.BodyBuilder
-
cn.taketoday.http中ResponseEntity.BodyBuilder的使用
修饰符和类型方法说明static ResponseEntity.BodyBuilderResponseEntity.accepted()Create a builder with an ACCEPTED status.ResponseEntity.DefaultBuilder.allow(HttpMethod... allowedMethods) static ResponseEntity.BodyBuilderResponseEntity.badRequest()Create a builder with a BAD_REQUEST status.ResponseEntity.DefaultBuilder.cacheControl(CacheControl cacheControl) ResponseEntity.BodyBuilder.contentLength(long contentLength) Set the length of the body in bytes, as specified by theContent-Lengthheader.ResponseEntity.DefaultBuilder.contentLength(long contentLength) ResponseEntity.BodyBuilder.contentType(MediaType contentType) Set the media type of the body, as specified by theContent-Typeheader.ResponseEntity.DefaultBuilder.contentType(MediaType contentType) static ResponseEntity.BodyBuilderCreate a new builder with a CREATED status and a location header set to the given URI.ResponseEntity.DefaultBuilder.headers(HttpHeaders headers) ResponseEntity.DefaultBuilder.headers(Consumer<HttpHeaders> headersConsumer) ResponseEntity.DefaultBuilder.lastModified(long date) ResponseEntity.DefaultBuilder.lastModified(Instant date) ResponseEntity.DefaultBuilder.lastModified(ZonedDateTime date) static ResponseEntity.BodyBuilderResponseEntity.ok()Create a builder with the status set to OK.static ResponseEntity.BodyBuilderResponseEntity.status(int status) Create a builder with the given status.static ResponseEntity.BodyBuilderResponseEntity.status(HttpStatusCode status) Create a builder with the given status.static ResponseEntity.BodyBuilderResponseEntity.unprocessableEntity()Create a builder with an UNPROCESSABLE_ENTITY status.