我正在尝试从Azure函数返回XML配置文件。配置正在写入如下所示的字符串。
xml = @"<note>
<to>Tove</to>
<from>Jani</from>
<heading>Reminder</heading>
<body>Don't forget me this weekend!</body>
</note>";
那我就这样退回去
return req.CreateResponse(HttpStatusCode.OK, xml.Replace("\r\n",""));
但是,HTTP调用的结果如下所示
"
<note>
<to>Tove</to>
<from>Jani</from>
<heading>Reminder</heading>
<body>Don't forget me this weekend!</body>
</note>"
如何去掉括起来的引号?
1条答案
按热度按时间lsmepo6l1#
您可以使用https://learn.microsoft.com/en-us/dotnet/api/microsoft.aspnetcore.mvc.contentresult?view=aspnetcore-6.0