Content type needs to be set before connection is set.