What purposes should I use class StringContent for?

后端 未结 4 1678
醉酒成梦
醉酒成梦 2020-12-14 07:06

There is StringContent class in System.Net.Http namespace. What purposes should I use class StringContent for?

4条回答
  •  陌清茗
    陌清茗 (楼主)
    2020-12-14 07:42

    It provides HTTP content based on a string.

    Example:

    Adding the content on HTTPResponseMessage Object

    response.Content = new StringContent("Place response text here");
    

提交回复
热议问题