类 DefaultServerRequestBuilder
- 所有已实现的接口:
ServerRequest.Builder
ServerRequest.Builder implementation.- 从以下版本开始:
- 4.0
- 作者:
- Arjen Poutsma, Harry Yang
-
嵌套类概要
嵌套类修饰符和类型类说明private static classprivate static class -
字段概要
字段修饰符和类型字段说明private byte[]private final cn.taketoday.util.MultiValueMap<String,HttpCookie> private final HttpHeadersprivate final List<HttpMessageConverter<?>>private HttpMethodprivate InetSocketAddressprivate final RequestContextprivate URI -
构造器概要
构造器 -
方法概要
修饰符和类型方法说明Add an attribute with the given name and value.attributes(Consumer<Map<String, Object>> attributesConsumer) Manipulate this request's attributes with the given consumer.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.build()Build the request.Add a cookie with the given name and value(s).cookies(Consumer<cn.taketoday.util.MultiValueMap<String, HttpCookie>> cookiesConsumer) Manipulate this request's cookies with the given consumer.Add the given header value(s) under the given name.headers(Consumer<HttpHeaders> headersConsumer) Manipulate this request's headers with the given consumer.method(HttpMethod method) Set the method of the request.Add a parameter with the given name and value.Manipulate this request's parameters with the given consumer.remoteAddress(InetSocketAddress remoteAddress) Set the remote address of the request.Set the URI of the request.
-
字段详细资料
-
requestContext
-
messageConverters
-
method
-
uri
-
headers
-
cookies
-
attributes
-
params
-
remoteAddress
-
body
private byte[] body
-
-
构造器详细资料
-
DefaultServerRequestBuilder
-
-
方法详细资料
-
method
从接口复制的说明:ServerRequest.BuilderSet the method of the request.- 指定者:
method在接口中ServerRequest.Builder- 参数:
method- the new method- 返回:
- this builder
-
uri
从接口复制的说明:ServerRequest.BuilderSet the URI of the request.- 指定者:
uri在接口中ServerRequest.Builder- 参数:
uri- the new URI- 返回:
- this builder
-
header
从接口复制的说明:ServerRequest.BuilderAdd the given header value(s) under the given name.- 指定者:
header在接口中ServerRequest.Builder- 参数:
headerName- the header nameheaderValues- the header value(s)- 返回:
- this builder
- 另请参阅:
-
headers
从接口复制的说明:ServerRequest.BuilderManipulate this request's headers with the given consumer.The headers provided to the consumer are "live", so that the consumer can be used to overwrite existing header values, remove values, or use any of the other
HttpHeadersmethods.- 指定者:
headers在接口中ServerRequest.Builder- 参数:
headersConsumer- a function that consumes theHttpHeaders- 返回:
- this builder
-
cookie
从接口复制的说明:ServerRequest.BuilderAdd a cookie with the given name and value(s).- 指定者:
cookie在接口中ServerRequest.Builder- 参数:
name- the cookie namevalues- the cookie value(s)- 返回:
- this builder
-
cookies
public ServerRequest.Builder cookies(Consumer<cn.taketoday.util.MultiValueMap<String, HttpCookie>> cookiesConsumer) 从接口复制的说明:ServerRequest.BuilderManipulate this request's cookies with the given consumer.The map provided to the consumer is "live", so that the consumer can be used to overwrite existing cookies, remove cookies, or use any of the other
MultiValueMapmethods.- 指定者:
cookies在接口中ServerRequest.Builder- 参数:
cookiesConsumer- a function that consumes the cookies map- 返回:
- this builder
-
body
从接口复制的说明:ServerRequest.BuilderSet the body of the request.Calling this methods will release the existing body of the builder.
- 指定者:
body在接口中ServerRequest.Builder- 参数:
body- the new body- 返回:
- this builder
-
body
从接口复制的说明:ServerRequest.BuilderSet the body of the request to the UTF-8 encoded bytes of the given string.Calling this methods will release the existing body of the builder.
- 指定者:
body在接口中ServerRequest.Builder- 参数:
body- the new body- 返回:
- this builder
-
attribute
从接口复制的说明:ServerRequest.BuilderAdd an attribute with the given name and value.- 指定者:
attribute在接口中ServerRequest.Builder- 参数:
name- the attribute namevalue- the attribute value- 返回:
- this builder
-
attributes
从接口复制的说明:ServerRequest.BuilderManipulate this request's attributes with the given consumer.The map provided to the consumer is "live", so that the consumer can be used to overwrite existing attributes, remove attributes, or use any of the other
Mapmethods.- 指定者:
attributes在接口中ServerRequest.Builder- 参数:
attributesConsumer- a function that consumes the attributes map- 返回:
- this builder
-
param
从接口复制的说明:ServerRequest.BuilderAdd a parameter with the given name and value.- 指定者:
param在接口中ServerRequest.Builder- 参数:
name- the parameter namevalues- the parameter value(s)- 返回:
- this builder
-
params
public ServerRequest.Builder params(Consumer<cn.taketoday.util.MultiValueMap<String, String>> paramsConsumer) 从接口复制的说明:ServerRequest.BuilderManipulate this request's parameters with the given consumer.The map provided to the consumer is "live", so that the consumer can be used to overwrite existing cookies, remove cookies, or use any of the other
MultiValueMapmethods.- 指定者:
params在接口中ServerRequest.Builder- 参数:
paramsConsumer- a function that consumes the parameters map- 返回:
- this builder
-
remoteAddress
从接口复制的说明:ServerRequest.BuilderSet the remote address of the request.- 指定者:
remoteAddress在接口中ServerRequest.Builder- 参数:
remoteAddress- the remote address- 返回:
- this builder
-
build
从接口复制的说明:ServerRequest.BuilderBuild the request.- 指定者:
build在接口中ServerRequest.Builder- 返回:
- the built request
-