问题
I am trying to read the request body data from ServerWebExchange in Spring Cloud Gateway. can anyone please help me how to do this.
Also why this simple task is so difficult in reactive programming.
回答1:
It's the same as reading or modifying the response body.
see: ModifyRequestBodyGatewayFilterFactory
and ModifyResponseBodyGatewayFilterFactory
How to get response body in Spring Gateway
来源:https://stackoverflow.com/questions/64589858/read-the-request-body-from-serverwebexchange-spring-cloud-gateway