title: How to authorize using Apache Camel?
body: <p>I have to make a POST request </p>
  
  <pre><code>curl -X POST --data-binary @auth.json http://somehost.com/auth
  {
      "response": {
          "status": "OK",
          "token": "622cee5f8c99c81e87614e9efc63eddb"
      }
  }
  </code></pre>
  
  <p>, and this will return a JSON response with the token. auth.json is a JSON file with login and password. I then have two options: put the token in the header in future requests as "Authorization: TOKEN", or put it in a cookie and make other requests.
  How can I do it with Apache Camel? How can I receive HTTP response? Where do I put the token?
  Now I have:</p>
  
  <pre><code>public static void main(String args[]) throws Exception {
      CamelContext context = new DefaultCamelContext();
      context.addRoutes(new RouteBuilder() {
          public void configure() {
              from("file:data/inbox?noop=true")
              .to("http://somehost.com/auth");
          }
      });
      context.start();
      Thread.sleep(10000);
      context.stop(); 
  </code></pre>
  
  <p>}
  and I have the auth.json file in ./data/inbox</p>