接口的使用
cn.taketoday.web.handler.function.ServerResponse.BodyBuilder
程序包
说明
Provides the types that make up Infra functional web framework.
-
cn.taketoday.web.handler.function中ServerResponse.BodyBuilder的使用
修饰符和类型方法说明static ServerResponse.BodyBuilderServerResponse.accepted()Create a builder with a 202 Accepted status.DefaultServerResponseBuilder.allow(HttpMethod... allowedMethods) DefaultServerResponseBuilder.allow(Set<HttpMethod> allowedMethods) static ServerResponse.BodyBuilderServerResponse.badRequest()Create a builder with a 400 Bad Request status.DefaultServerResponseBuilder.cacheControl(CacheControl cacheControl) DefaultServerResponseBuilder.contentLength(long contentLength) ServerResponse.BodyBuilder.contentLength(long contentLength) Set the length of the body in bytes, as specified by theContent-Lengthheader.DefaultServerResponseBuilder.contentType(MediaType contentType) ServerResponse.BodyBuilder.contentType(MediaType contentType) Set the media type of the body, as specified by theContent-Typeheader.DefaultServerResponseBuilder.cookie(HttpCookie cookie) DefaultServerResponseBuilder.cookies(Consumer<cn.taketoday.util.MultiValueMap<String, HttpCookie>> cookiesConsumer) static ServerResponse.BodyBuilderCreate a builder with a 201 Created status and a location header set to the given URI.static ServerResponse.BodyBuilderServerResponse.from(ServerResponse other) Create a builder with the status code and headers of the given response.DefaultServerResponseBuilder.headers(Consumer<HttpHeaders> headersConsumer) DefaultServerResponseBuilder.lastModified(Instant lastModified) DefaultServerResponseBuilder.lastModified(ZonedDateTime lastModified) static ServerResponse.BodyBuilderServerResponse.ok()Create a builder with the status set to 200 OK.static ServerResponse.BodyBuilderServerResponse.permanentRedirect(URI location) Create a builder with a 308 Permanent Redirect status and a location header set to the given URI.static ServerResponse.BodyBuilderCreate a builder with a 303 See Other status and a location header set to the given URI.static ServerResponse.BodyBuilderServerResponse.status(int status) Create a builder with the given HTTP status.static ServerResponse.BodyBuilderServerResponse.status(HttpStatusCode status) Create a builder with the given HTTP status.static ServerResponse.BodyBuilderServerResponse.temporaryRedirect(URI location) Create a builder with a 307 Temporary Redirect status and a location header set to the given URI.static ServerResponse.BodyBuilderServerResponse.unprocessableEntity()Create a builder with a 422 Unprocessable Entity status.