我应该将StringContent类用于什么目的? [英] What purposes should I use class StringContent for?

查看:80
本文介绍了我应该将StringContent类用于什么目的?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

System.Net中有 StringContent类 .Http命名空间.我应该将StringContent类用于什么目的?

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

推荐答案

它基于字符串提供HTTP内容.

It provides HTTP content based on a string.

在HTTPResponseMessage对象上添加内容

Adding the content on HTTPResponseMessage Object

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

这篇关于我应该将StringContent类用于什么目的?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆