[ 
https://issues.apache.org/jira/browse/CAMEL-17040?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17493848#comment-17493848
 ] 

Neo Xu edited comment on CAMEL-17040 at 2/17/22, 10:50 AM:
-----------------------------------------------------------

I think it should be the place since [RestProducer.java] pass values to 
[RestProducerBindingProcessor.java] 

Found the actual code line 326 in RestProducerBindingProcessor
// is the body empty
if (exchange.hasOut() && exchange.getOut().getBody() == null
|| !exchange.hasOut() && exchange.getIn().getBody() == null) {
return;
}


was (Author: JIRAUSER285242):
I think it should be the place since [RestProducer.java] pass values to 
[RestProducerBindingProcessor.java]

> rest-dsl - Add option to return http 204 when no data in response
> -----------------------------------------------------------------
>
>                 Key: CAMEL-17040
>                 URL: https://issues.apache.org/jira/browse/CAMEL-17040
>             Project: Camel
>          Issue Type: Improvement
>          Components: camel-core, rest
>            Reporter: Claus Ibsen
>            Priority: Major
>             Fix For: 3.x
>
>
> For example if you have a json response as an empty list, then you can get a 
> 200 OK with [] as response.
> Or with an XML then it may be an empty xml root object.
> It may be desirable to have an option you can set to true to let Camel 
> auto-detect this and return no body and 204 instead.



--
This message was sent by Atlassian Jira
(v8.20.1#820001)

Reply via email to