You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@servicecomb.apache.org by GitBox <gi...@apache.org> on 2018/06/29 03:33:57 UTC
[GitHub] acsukesh commented on a change in pull request #781: [SCB-701] RequestBody(required = false) should invoke method when bod…
acsukesh commented on a change in pull request #781: [SCB-701] RequestBody(required = false) should invoke method when bod…
URL: https://github.com/apache/incubator-servicecomb-java-chassis/pull/781#discussion_r199045160
##########
File path: common/common-rest/src/main/java/org/apache/servicecomb/common/rest/codec/param/BodyProcessorCreator.java
##########
@@ -77,7 +83,10 @@ public void setValue(RestClientRequest clientRequest, Object arg) throws Excepti
try (BufferOutputStream output = new BufferOutputStream()) {
clientRequest.putHeader(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON);
RestObjectMapper.INSTANCE.writeValue(output, arg);
- clientRequest.write(output.getBuffer());
+ if (arg != null) {
Review comment:
its already added. private static void testRequiredBody(RestTemplate template, String microserviceName) , server code @ AnnotationsTest.java,
TestMgr.check("No user data found",
+ template.postForObject(prefix + "/annotations/saysomething?prefix={prefix}",
+ null,
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on 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
With regards,
Apache Git Services