You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shenyu.apache.org by GitBox <gi...@apache.org> on 2021/06/25 10:01:07 UTC
[GitHub] [incubator-shenyu] Zhoutzzz commented on issue #1672: 请问如何从ServerHttpRequest获取body内容并解析?
Zhoutzzz commented on issue #1672:
URL: https://github.com/apache/incubator-shenyu/issues/1672#issuecomment-868386154
For example, my request body content is json string, I can process like this:
`exchange.getRequest().getBody()
.map(x -> {
byte[] b = new byte[x.readableByteCount()];
x.read(b);
String string = new String(b, StandardCharsets.UTF_8);
return string;
}).subscribe();`
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org