接口的使用
cn.taketoday.web.handler.function.ServerRequest.Builder
使用ServerRequest.Builder的程序包
程序包
说明
Provides the types that make up Infra functional web framework.
-
cn.taketoday.web.handler.function中ServerRequest.Builder的使用
修饰符和类型方法说明Add an attribute with the given name and value.DefaultServerRequestBuilder.attributes(Consumer<Map<String, Object>> attributesConsumer) ServerRequest.Builder.attributes(Consumer<Map<String, Object>> attributesConsumer) Manipulate this request's attributes with the given consumer.DefaultServerRequestBuilder.body(byte[] body) ServerRequest.Builder.body(byte[] body) Set the body of the request.Set the body of the request to the UTF-8 encoded bytes of the given string.Add a cookie with the given name and value(s).DefaultServerRequestBuilder.cookies(Consumer<cn.taketoday.util.MultiValueMap<String, HttpCookie>> cookiesConsumer) ServerRequest.Builder.cookies(Consumer<cn.taketoday.util.MultiValueMap<String, HttpCookie>> cookiesConsumer) Manipulate this request's cookies with the given consumer.static ServerRequest.BuilderServerRequest.from(ServerRequest other) Create a builder with the status, headers, and cookies of the given request.Add the given header value(s) under the given name.DefaultServerRequestBuilder.headers(Consumer<HttpHeaders> headersConsumer) ServerRequest.Builder.headers(Consumer<HttpHeaders> headersConsumer) Manipulate this request's headers with the given consumer.DefaultServerRequestBuilder.method(HttpMethod method) ServerRequest.Builder.method(HttpMethod method) Set the method of the request.Add a parameter with the given name and value.DefaultServerRequestBuilder.params(Consumer<cn.taketoday.util.MultiValueMap<String, String>> paramsConsumer) ServerRequest.Builder.params(Consumer<cn.taketoday.util.MultiValueMap<String, String>> paramsConsumer) Manipulate this request's parameters with the given consumer.DefaultServerRequestBuilder.remoteAddress(InetSocketAddress remoteAddress) ServerRequest.Builder.remoteAddress(InetSocketAddress remoteAddress) Set the remote address of the request.Set the URI of the request.