Is there an existing issue for this?
Current Behavior
Load the plug-in package in the form of jar, in the protected abstract Mono doExecute(ServerWebExchange exchange, ShenyuPluginChain chain, SelectorData selector, RuleData rule) {} method in the plug-in, the request obtained by the serverRequest.bodyToMono(String.class) method body is empty
Expected Behavior
The request body can be obtained correctly through the serverRequest.bodyToMono(String.class) method
Steps To Reproduce
1.version:2.4.2
2.Customize the plug-in, package it into a jar, put it in the ext-lib folder
3.Processing in plugins:
protected Mono doExecute(final ServerWebExchange exchange, final ShenyuPluginChain chain, final SelectorData selector, final RuleData rule) {
ServerRequest serverRequest = ServerRequest.create(exchange, MESSAGE_READERS);
Mono mono = serverRequest.bodyToMono(String.class)
.switchIfEmpty(Mono.defer(() -> Mono.just("")))
.flatMap(originalBody -> //originalBody is ”“);
//todo
}
Environment
Debug logs
No response
Anything else?
No response
Is there an existing issue for this?
Current Behavior
Load the plug-in package in the form of jar, in the protected abstract Mono doExecute(ServerWebExchange exchange, ShenyuPluginChain chain, SelectorData selector, RuleData rule) {} method in the plug-in, the request obtained by the serverRequest.bodyToMono(String.class) method body is empty
Expected Behavior
The request body can be obtained correctly through the serverRequest.bodyToMono(String.class) method
Steps To Reproduce
1.version:2.4.2
2.Customize the plug-in, package it into a jar, put it in the ext-lib folder
3.Processing in plugins:
protected Mono doExecute(final ServerWebExchange exchange, final ShenyuPluginChain chain, final SelectorData selector, final RuleData rule) {
ServerRequest serverRequest = ServerRequest.create(exchange, MESSAGE_READERS);
Mono mono = serverRequest.bodyToMono(String.class)
.switchIfEmpty(Mono.defer(() -> Mono.just("")))
.flatMap(originalBody -> //originalBody is ”“);
//todo
}
Environment
Debug logs
No response
Anything else?
No response