Terrence
Terrence

Reputation: 178

How to get the request data body through ServerWebExchange?

The data body in the request can be obtained through ServerWebExchange, but this data structure can not be converted into a string, although I can get a string method.

Flux<DataBuffer> requestBody = exchange.getRequest().getBody();

Upvotes: 1

Views: 1809

Answers (1)

gzldc
gzldc

Reputation: 21

exchange.getAttribute("cachedRequestBodyObject")

Upvotes: 1

Related Questions