The president has been pressing Republicans in the Senate to move quickly to embrace sprawling legislation that carries his domestic agenda, including by savaging opponents online.