President Obama urged lawmakers to put politics aside just hours before the US had its credit rating downgraded.