Return-Path: X-Original-To: apmail-camel-users-archive@www.apache.org Delivered-To: apmail-camel-users-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 2D0FD10930 for ; Fri, 28 Feb 2014 07:18:35 +0000 (UTC) Received: (qmail 93573 invoked by uid 500); 28 Feb 2014 07:18:34 -0000 Delivered-To: apmail-camel-users-archive@camel.apache.org Received: (qmail 93534 invoked by uid 500); 28 Feb 2014 07:18:33 -0000 Mailing-List: contact users-help@camel.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: users@camel.apache.org Delivered-To: mailing list users@camel.apache.org Received: (qmail 93526 invoked by uid 99); 28 Feb 2014 07:18:33 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 28 Feb 2014 07:18:33 +0000 X-ASF-Spam-Status: No, hits=0.6 required=5.0 tests=RCVD_IN_DNSWL_LOW,SPF_PASS,URI_HEX X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of claus.ibsen@gmail.com designates 209.85.223.176 as permitted sender) Received: from [209.85.223.176] (HELO mail-ie0-f176.google.com) (209.85.223.176) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 28 Feb 2014 07:18:29 +0000 Received: by mail-ie0-f176.google.com with SMTP id rd18so1163313iec.7 for ; Thu, 27 Feb 2014 23:18:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type; bh=O7b9CXrtFrYhysvMEVWa2d4xpglDMVJpPckdK5Op/YA=; b=AO3I6UNOfxYVkGhWaPrYuRLyI0RgUm2W2b3T4xbhv/L89JymLmoz1TcV+2fh2u1VW8 Qui4fpiXzN6PV+cbA3WFKpNUVtHRNbW9UalD4HPuUbZrwETsxc0zLj3OshSYsGC6eits iO7RDb0fyMXi0+aUTX5pO39dAeexIkXFWHTnURfoVYkDP6VpG8BKdS3M1ItFHcAzXWnY zWJYkdNVr0vc8CaP4CX7UFIFQPW1ItmWOrcvXTaoygPrvgzbrJvDE2tDsOrO3fRjoOcm AP+J/AWusu8KX/4hZa7LF+P58wjvoYsbAbse4iNlEmZVhG9YISoNmmxtK3hXO8OQcXX7 LvWw== X-Received: by 10.51.17.104 with SMTP id gd8mr2325909igd.48.1393571888852; Thu, 27 Feb 2014 23:18:08 -0800 (PST) MIME-Version: 1.0 Received: by 10.64.147.69 with HTTP; Thu, 27 Feb 2014 23:17:48 -0800 (PST) In-Reply-To: <1393528727037-5748043.post@n5.nabble.com> References: <1393528727037-5748043.post@n5.nabble.com> From: Claus Ibsen Date: Fri, 28 Feb 2014 08:17:48 +0100 Message-ID: Subject: Re: Calling route via direct that does an HTTP POST To: "users@camel.apache.org" Content-Type: text/plain; charset=ISO-8859-1 X-Virus-Checked: Checked by ClamAV on apache.org Hi So are you saying you want to call a route with direct, that reads a file, and sends the file to a HTTP POST? If so take a look at the content enricher EIP and the pollEnrich method http://camel.apache.org/content-enricher.html from direct pollEnrich to http On Thu, Feb 27, 2014 at 8:18 PM, mister blinky wrote: > If I have a route that i call from other routes (via "direct") that does an > HTTP POST. How do I get the file that I want to post into the body of the > message before invoking the .to("http://")? > > The problem I'm facing is that, since every "from" in the route gets started > when the route is started, starting this route starts the "direct" as well > as the "file" consumer. I don't want to start a file consumer -- I just want > to shove the contents of the file i want to POST into the message body of > the .to("http://..."). > > from("direct:post") > .from("file:?fileName=") > .to("http://") > .end(); > > I suppose I could put an inline process that reads a file and sets it to the > body of the exchange. But I would think there is a simpler way? > > > > > > > > -- > View this message in context: http://camel.465427.n5.nabble.com/Calling-route-via-direct-that-does-an-HTTP-POST-tp5748043.html > Sent from the Camel - Users mailing list archive at Nabble.com. -- Claus Ibsen ----------------- Red Hat, Inc. Email: cibsen@redhat.com Twitter: davsclaus Blog: http://davsclaus.com Author of Camel in Action: http://www.manning.com/ibsen Make your Camel applications look hawt, try: http://hawt.io