These methods are available in both the production and test Request objects.
Useful for discovering what domain/subdomain(s) the current request came from (Rails application may operate differently depending on which subdomain is passed in, this is a great way to segment functionality using the route).
Doesn’t get much simpler than that :).
Likewise if you want to see only the subdomain component(s). Given a domain, example.com