@ -115,7 +115,7 @@ class DefaultServerRequestBuilder implements ServerRequest.Builder {
@@ -115,7 +115,7 @@ class DefaultServerRequestBuilder implements ServerRequest.Builder {
@Override
public ServerRequest . Builder header ( String headerName , String . . . headerValues ) {
Assert . notNull ( headerName , "Header N ame must not be null" ) ;
Assert . notNull ( headerName , "Header n ame must not be null" ) ;
for ( String headerValue : headerValues ) {
this . headers . add ( headerName , headerValue ) ;
}
@ -124,14 +124,14 @@ class DefaultServerRequestBuilder implements ServerRequest.Builder {
@@ -124,14 +124,14 @@ class DefaultServerRequestBuilder implements ServerRequest.Builder {
@Override
public ServerRequest . Builder headers ( Consumer < HttpHeaders > headersConsumer ) {
Assert . notNull ( headersConsumer , "Header C onsumer must not be null" ) ;
Assert . notNull ( headersConsumer , "Headers c onsumer must not be null" ) ;
headersConsumer . accept ( this . headers ) ;
return this ;
}
@Override
public ServerRequest . Builder cookie ( String name , String . . . values ) {
Assert . notNull ( name , "Cookie N ame must not be null" ) ;
Assert . notNull ( name , "Cookie n ame must not be null" ) ;
for ( String value : values ) {
this . cookies . add ( name , new Cookie ( name , value ) ) ;
}
@ -140,41 +140,41 @@ class DefaultServerRequestBuilder implements ServerRequest.Builder {
@@ -140,41 +140,41 @@ class DefaultServerRequestBuilder implements ServerRequest.Builder {
@Override
public ServerRequest . Builder cookies ( Consumer < MultiValueMap < String , Cookie > > cookiesConsumer ) {
Assert . notNull ( cookiesConsumer , "Cookie C onsumer must not be null" ) ;
Assert . notNull ( cookiesConsumer , "Cookies c onsumer must not be null" ) ;
cookiesConsumer . accept ( this . cookies ) ;
return this ;
}
@Override
public ServerRequest . Builder body ( byte [ ] body ) {
Assert . notNull ( body , "b ody must not be null" ) ;
Assert . notNull ( body , "B ody must not be null" ) ;
this . body = body ;
return this ;
}
@Override
public ServerRequest . Builder body ( String body ) {
Assert . notNull ( body , "b ody must not be null" ) ;
Assert . notNull ( body , "B ody must not be null" ) ;
return body ( body . getBytes ( StandardCharsets . UTF_8 ) ) ;
}
@Override
public ServerRequest . Builder attribute ( String name , Object value ) {
Assert . notNull ( name , "n ame must not be null" ) ;
Assert . notNull ( name , "N ame must not be null" ) ;
this . attributes . put ( name , value ) ;
return this ;
}
@Override
public ServerRequest . Builder attributes ( Consumer < Map < String , Object > > attributesConsumer ) {
Assert . notNull ( attributesConsumer , "AttributesC onsumer must not be null" ) ;
Assert . notNull ( attributesConsumer , "Attributes c onsumer must not be null" ) ;
attributesConsumer . accept ( this . attributes ) ;
return this ;
}
@Override
public ServerRequest . Builder param ( String name , String . . . values ) {
Assert . notNull ( name , "n ame must not be null" ) ;
Assert . notNull ( name , "N ame must not be null" ) ;
for ( String value : values ) {
this . params . add ( name , value ) ;
}
@ -183,7 +183,7 @@ class DefaultServerRequestBuilder implements ServerRequest.Builder {
@@ -183,7 +183,7 @@ class DefaultServerRequestBuilder implements ServerRequest.Builder {
@Override
public ServerRequest . Builder params ( Consumer < MultiValueMap < String , String > > paramsConsumer ) {
Assert . notNull ( paramsConsumer , "paramsC onsumer must not be null" ) ;
Assert . notNull ( paramsConsumer , "Parameters c onsumer must not be null" ) ;
paramsConsumer . accept ( this . params ) ;
return this ;
}