You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by Tim Dudgeon <td...@gmail.com> on 2015/01/29 17:41:55 UTC

http caller's IP address

When using REST DSL with jetty/restlet/etc is it possible to know the 
caller's IP address?
I can't see any header property for this.

Tim

Re: http caller's IP address

Posted by Tim Dudgeon <td...@gmail.com>.
Thanks. For reference this is how it can be done (for Jetty at least, 
but probs most others too) using a simple expression:

simple("${header.CamelHttpServletRequest?.remoteAddr}")

Tim

On 29/01/2015 16:56, Claus Ibsen wrote:
> Hi
>
> Depending on which component you use, you can get access to its native
> type, such as HttpRequest, and use that to get the caller ip, just as
> you would have to do if you use the components without rest-dsl.
>
> On Thu, Jan 29, 2015 at 5:41 PM, Tim Dudgeon <td...@gmail.com> wrote:
>> When using REST DSL with jetty/restlet/etc is it possible to know the
>> caller's IP address?
>> I can't see any header property for this.
>>
>> Tim
>
>


Re: http caller's IP address

Posted by Claus Ibsen <cl...@gmail.com>.
Hi

Depending on which component you use, you can get access to its native
type, such as HttpRequest, and use that to get the caller ip, just as
you would have to do if you use the components without rest-dsl.

On Thu, Jan 29, 2015 at 5:41 PM, Tim Dudgeon <td...@gmail.com> wrote:
> When using REST DSL with jetty/restlet/etc is it possible to know the
> caller's IP address?
> I can't see any header property for this.
>
> Tim



-- 
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
hawtio: http://hawt.io/
fabric8: http://fabric8.io/