Add more subtle content negotiation in web layer
So that single Strings can be POSTed without JSON conversion. There's still some work to do to support single POJOs in JSON, and to reach parity with the WebFlux reactive type handlers, but it's now closer to what we had before we moved the String conversion out of the function layer.
This commit is contained in:
@@ -46,6 +46,7 @@ public class SampleApplicationTests {
|
||||
|
||||
@Test
|
||||
public void uppercase() {
|
||||
// TODO: make this work with a JSON stream as well (like in WebFlux)
|
||||
assertThat(new TestRestTemplate().postForObject(
|
||||
"http://localhost:" + port + "/uppercase", "[{\"value\":\"foo\"}]",
|
||||
String.class)).isEqualTo("[{\"value\":\"FOO\"}]");
|
||||
|
||||
Reference in New Issue
Block a user