How to get client IP address in Roda?

I am using Roda and I need to get the client IP address from the http request. In Sinatra, I think it will be:

request.ip

Is there an equivalent method in Roda?

+4
source share
1 answer

This exact code should work in Rode. It is not explicitly mentioned in the Roda documentation, but Roda :: RodaRequest is a subclass of Rack :: Request and Rack :: Request # ip returns the IP address of the client.

+4
source

All Articles