Return raw string from REST service method

后端 未结 1 735
不思量自难忘°
不思量自难忘° 2021-01-11 13:53

I have a REST service method written in C#, defined as below:

[WebGet(UriTemplate = \"/{par1}/{par2}/{par3}\")]
public string ProcessGet(string par1, string          


        
相关标签:
1条回答
  • 2021-01-11 14:10

    Return it as a Stream - that causes the "raw" mode to be used and WCF will not touch your response. You can find more information at http://blogs.msdn.com/b/carlosfigueira/archive/2008/04/17/wcf-raw-programming-model-web.aspx.

    0 讨论(0)
提交回复
热议问题