Detect content type and charset; serialize response headers into http.Header for serialization.