title: Issue with Apache Camel https rest api with username and password
body: <p>I have the following piece of code, I've built for connecting to a "https" REST end point using Apache Camel. The problem is that I get 401 error if this is run. </p>
  
  <pre><code>from("timer:learnTimer?period=100s")
              .to("log:?level=INFO&amp;showBody=true")
              .setHeader("currentTime", simple(currentTime))
              .setHeader(Exchange.CONTENT_TYPE,constant("application/json"))
              .setHeader(Exchange.HTTP_METHOD, constant("GET"))
              .setHeader(Exchange.HTTP_URI, simple("https://xxxxxx/api/siem/offenses?filter=status%20%3D%20%22OPEN%22%20and%20start_time%20%3E%201543647979000?&amp;authMethod=Basic&amp;authUsername=xxxxx&amp;authPassword=xxxxx"))
              .to("https://xxxxxxx/api/siem/offenses?filter=status%20%3D%20%22OPEN%22%20and%20start_time%20%3E%201543647979000?&amp;authMethod=Basic&amp;authUsername=xxxx&amp;authPassword=xxxx").convertBodyTo(String.class)
              .to("log:?level=INFO&amp;showBody=true");
  </code></pre>
  
  <hr>
  
  <p>The error I am receiving is:</p>
  
  <h2>Stacktrace</h2>
  
  <p>org.apache.camel.http.common.HttpOperationFailedException: HTTP operation failed invoking <a href="https://xx.xx.xx.xx/api/siem/offenses?filter=status+%3D+%22OPEN%22+and+start_time+%3E+1543647979000%3F" rel="nofollow noreferrer">https://xx.xx.xx.xx/api/siem/offenses?filter=status+%3D+%22OPEN%22+and+start_time+%3E+1543647979000%3F</a> with statusCode: 401
          at org.apache.camel.component.http.HttpProducer.populateHttpOperationFailedException(HttpProducer.java:243)
          at org.apache.camel.component.http.HttpProducer.process(HttpProducer.java:165)
          at org.apache.camel.util.AsyncProcessorConverterHelper$ProcessorToAsyncProcessorBridge.process(AsyncProcessorConverterHelper.java:61)
          at org.apache.camel.processor.SendProcessor.process(SendProcessor.java:148)
          at org.apache.camel.processor.RedeliveryErrorHandler.process(RedeliveryErrorHandler.java:548)
          at org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:201)
          at org.apache.camel.processor.Pipeline.process(Pipeline.java:138)
          at org.apache.camel.processor.Pipeline.process(Pipeline.java:101)
          at org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:201)
          at org.apache.camel.component.timer.TimerConsumer.sendTimerExchange(TimerConsumer.java:197)
          at org.apache.camel.component.timer.TimerConsumer$1.run(TimerConsumer.java:79)
          at java.util.TimerThread.mainLoop(Timer.java:555)
          at java.util.TimerThread.run(Timer.java:505)
  15:16| WARN | CamelLogger.java 213 | Error processing exchange. Exchange[ID-zabbixproxy-node2-1544019394005-0-1]. Caused by: [org.apache.camel.http.common.HttpOperationFailedException - HTTP operation failed invoking <a href="https://xx.xx.xx.xx/api/siem/offenses?filter=status+%3D+%22OPEN%22+and+start_time+%3E+1543647979000%3F" rel="nofollow noreferrer">https://xx.xx.xx.xx/api/siem/offenses?filter=status+%3D+%22OPEN%22+and+start_time+%3E+1543647979000%3F</a> with statusCode: 401]
  org.apache.camel.http.common.HttpOperationFailedException: HTTP operation failed invoking <a href="https://10.96.40.66/api/siem/offenses?filter=status+%3D+%22OPEN%22+and+start_time+%3E+1543647979000%3F" rel="nofollow noreferrer">https://10.96.40.66/api/siem/offenses?filter=status+%3D+%22OPEN%22+and+start_time+%3E+1543647979000%3F</a> with statusCode: 401
          at org.apache.camel.component.http.HttpProducer.populateHttpOperationFailedException(HttpProducer.java:243)
          at org.apache.camel.component.http.HttpProducer.process(HttpProducer.java:165)
          at org.apache.camel.util.AsyncProcessorConverterHelper$ProcessorToAsyncProcessorBridge.process(AsyncProcessorConverterHelper.java:61)
          at org.apache.camel.processor.SendProcessor.process(SendProcessor.java:148)</p>