You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@camel.apache.org by "Nicola Ferraro (Jira)" <ji...@apache.org> on 2020/07/09 12:50:00 UTC

[jira] [Created] (CAMEL-15287) Non-uniform way to handle nulls in http clients

Nicola Ferraro created CAMEL-15287:
--------------------------------------

             Summary: Non-uniform way to handle nulls in http clients
                 Key: CAMEL-15287
                 URL: https://issues.apache.org/jira/browse/CAMEL-15287
             Project: Camel
          Issue Type: Bug
            Reporter: Nicola Ferraro


Suppose you have an external Quarkus service that replies always with null.

 

When calling it from a camel route via:
{code:java}
.to("http://quarkus-service/null-api") {code}
Then the body of the exchange is null.
 
But if we use:
 
{code:java}
 .to("netty-http:http://quarkus-service/null-api"){code}
 
Then the body becomes an empty InputStream, which is not null.
 
I don't know what's the correct way to handle such cases, but we should try to uniform them.
 
 



--
This message was sent by Atlassian Jira
(v8.3.4#803005)