我想以XML格式返回WebAPI的响应,响应将如下所示: " 启动回复标记"请求已成功处理" 结束响应标记" " 启动transid标记> C4592" 结束transid标记>"
以下代码返回错误。
return new HttpResponseMessage()
{
Content = new StringContent(string.Format("<response>Request successfully processed</response><transid>{0}</transid>", apiTransactionId), Encoding.UTF8, "application/xml")
};