title: Post request response using Camel Netty4 - HTTP operation failed invoking
body: <p>I'm new to Camel and am trying to get a response from a Netty4 route using a POST request. I'd like to send a JSON and return a string extracted from the body.</p>
  
  <p>My rest setup is as follows:</p>
  
  <pre><code>public class Server extends RouteBuilder {
  
      @Override
      public void configure() {
  
          String listenAddress = "0.0.0.0";
          int listenPort = 8080;
  
          restConfiguration()
                  .component("netty4-http")
                  .scheme("http")
                  .host(listenAddress)
                  .dataFormatProperty("prettyPrint", "true")
                  .bindingMode(RestBindingMode.auto)
                  .port(listenPort);
  
          rest("/")
                  .post()
                  .consumes("application/json; charset=UTF-8")
                  .to("direct:post");
      }
  }
  </code></pre>
  
  <p>Within my Camel route I'd like to send the message back using:</p>
  
  <pre><code>
  @Component
  public class RestRoute extends RouteBuilder {
  
      @Autowired
      CamelContext context;
  
      @Override
      public void configure() {
  
          from("direct:post")
                  .log("New Request")
                  .streamCaching()
  
                  .setHeader(Exchange.HTTP_METHOD,constant(org.apache.camel.component.http4.HttpMethods.POST))
                  .setBody().jsonpath("$.Text") // extract text from JSON
                  .to("http4://0.0.0.0:8080?bridgeEndpoint=true");
  
  </code></pre>
  
  <p>However I get the following error: <code>org.apache.camel.http.common.HttpOperationFailedException: HTTP operation failed invoking http://0.0.0.0:8080 with statusCode: 500</code></p>
  
  <p>I'd appreciate some help!</p>