The Democratic mayoral candidate said he was open to cooperating with the president, but was ready to fight for New Yorkers.