Common network request logic with automatic redirection