Tweak support for single valued text HTTP exchange

This commit is contained in:
Dave Syer
2018-05-02 13:00:22 -04:00
parent fa55ebab16
commit af5f5b78de
2 changed files with 9 additions and 0 deletions

View File

@@ -91,6 +91,7 @@ public class FluxHandlerMethodArgumentResolver
if (isPlainText(webRequest) && CharSequence.class.isAssignableFrom(type)) {
body = Arrays.asList(StreamUtils.copyToString(nativeRequest.getInputStream(),
Charset.forName("UTF-8")));
nativeRequest.setAttribute(WebRequestConstants.INPUT_SINGLE, true);
}
else {
String json = new String(StreamUtils.copyToString(