Wow, history does repeat itself.

From Howard Zinn’s A People’s History of the United States (page 152 - 153):

Polk spoke of the dispatch of the American troops to the Rio Grande as a necessary measure of defense. As John Schroeder says (Mr Polk’s War): “Indeed, the reverse was true; President Polk had incited war by sending American soldiers into what was disputed territory, historically controlled by Mexicans.”

Congress then rushed to approve the war message. Schroeder comments: “The disciplined Democratic majority in the House responded with alacrity and high-handed efficiency to Polk’s May 11 war recommendations.” The bundles of official documents accompanying the war message, supposed to be evidence for Polk’s statement, were not examined, but were tabled immediately by the House. Debate on the bill providing volunteers and money for the war was limited to two hours, and most of this was used up reading selected portions of the tabled documents, so that barely a half-hour was left for discussion of the issues.

The Whig party was presumably against the war in Mexico, but was not against expansion. The Whigs wanted California, but preferred to do it without war. As Schroeder puts it, “theirs was a commercially oriented expansionism designed to secure frontage on the Pacific without recourse to war.” Also, they were not so powerfully against the military action that they would stop it by denying men and money for the operation. They did not want to risk the accusation that they were putting American soldiers in peril by depriving them of the materials necessary to fight. The result was that Whigs joined Democrats in voting overwhelmingly for the war resolution, 174 to 14. The opposition was a small group of strongly antislavery Whigs, or “a little knot of ultraists,” as one Massachusetts Congressman who voted for the war measure put it.