How do I mock a request header when testing an app with Test::WWW::Mechanize?
My use case: I have a Catalyst app that, in one case, needs to grab a value from the hostname that's sending an API request. (Requests can come from something like forum_name.example.com and I need to extract "forum_name".)
How do I test this? When I use Test::WWW::Mechanize, all requests come from "localhost", but I need to try goodname.localhost to make sure that works, badname.localhost so I can reject an unconfigured name, etc.