Pass request as parameter so we get correct client