Fix #281, Set dataMode and headers properly to avoid multiple Content-Type headers