Asp.net web api 如何将webapi调用的内容管道化到文件?

Asp.net web api 如何将webapi调用的内容管道化到文件?,asp.net-web-api,Asp.net Web Api,我有一个返回xmldocument的webapi方法。我想在一个批处理cmd文件中执行我的webapi调用,并将该内容传输到一个文件中,这样我就可以将xml文档ftp到一个供应商。所以基本上我想这样做: c:> http:\\localhost\api\GetDocument\counterparties > c:\counterparties.xml 谢谢你的建议。使用cURL,免费下载 C:>Curl http://localhost/api/... > som

我有一个返回xmldocument的webapi方法。我想在一个批处理cmd文件中执行我的webapi调用,并将该内容传输到一个文件中,这样我就可以将xml文档ftp到一个供应商。所以基本上我想这样做:

 c:> http:\\localhost\api\GetDocument\counterparties > c:\counterparties.xml

谢谢你的建议。

使用cURL,免费下载

C:>Curl http://localhost/api/...  > somefile.txt