接口的使用
cn.taketoday.web.handler.function.EntityResponse.Builder
使用EntityResponse.Builder的程序包
程序包
说明
Provides the types that make up Infra functional web framework.
-
cn.taketoday.web.handler.function中EntityResponse.Builder的使用
修饰符和类型方法说明DefaultEntityResponseBuilder.allow(HttpMethod... allowedMethods) DefaultEntityResponseBuilder.allow(Set<HttpMethod> allowedMethods) EntityResponse.Builder.allow(HttpMethod... allowedMethods) Set the set of allowedHTTP methods, as specified by theAllowheader.EntityResponse.Builder.allow(Set<HttpMethod> allowedMethods) Set the set of allowedHTTP methods, as specified by theAllowheader.DefaultEntityResponseBuilder.cacheControl(CacheControl cacheControl) EntityResponse.Builder.cacheControl(CacheControl cacheControl) Set the caching directives for the resource, as specified by the HTTP 1.1Cache-Controlheader.DefaultEntityResponseBuilder.contentLength(long contentLength) EntityResponse.Builder.contentLength(long contentLength) Set the length of the body in bytes, as specified by theContent-Lengthheader.DefaultEntityResponseBuilder.contentType(MediaType contentType) EntityResponse.Builder.contentType(MediaType contentType) Set the media type of the body, as specified by theContent-Typeheader.DefaultEntityResponseBuilder.cookie(HttpCookie cookie) EntityResponse.Builder.cookie(HttpCookie cookie) Add the given cookie to the response.DefaultEntityResponseBuilder.cookies(Consumer<cn.taketoday.util.MultiValueMap<String, HttpCookie>> cookiesConsumer) EntityResponse.Builder.cookies(Consumer<cn.taketoday.util.MultiValueMap<String, HttpCookie>> cookiesConsumer) Manipulate this response's cookies with the given consumer.Set the entity tag of the body, as specified by theETagheader.static <T> EntityResponse.Builder<T>EntityResponse.fromObject(T t) Create a builder with the given object.static <T> EntityResponse.Builder<T>EntityResponse.fromObject(T t, cn.taketoday.core.ParameterizedTypeReference<T> entityType) Create a builder with the given object and type reference.Add the given header value(s) under the given name.DefaultEntityResponseBuilder.headers(Consumer<HttpHeaders> headersConsumer) EntityResponse.Builder.headers(Consumer<HttpHeaders> headersConsumer) Manipulate this response's headers with the given consumer.DefaultEntityResponseBuilder.lastModified(Instant lastModified) DefaultEntityResponseBuilder.lastModified(ZonedDateTime lastModified) EntityResponse.Builder.lastModified(Instant lastModified) Set the time the resource was last changed, as specified by theLast-Modifiedheader.EntityResponse.Builder.lastModified(ZonedDateTime lastModified) Set the time the resource was last changed, as specified by theLast-Modifiedheader.Set the location of a resource, as specified by theLocationheader.DefaultEntityResponseBuilder.status(int status) DefaultEntityResponseBuilder.status(HttpStatusCode status) EntityResponse.Builder.status(int status) Set the HTTP status.EntityResponse.Builder.status(HttpStatusCode status) Set the HTTP status.Configure one or more request header names (e.g.