Add helper function to determine request URL.