Class StringContent
Provides HTTP content based on a string.
public class StringContent : ByteArrayContent, IDisposable
- Inheritance
-
StringContent
- Implements
- Inherited Members
- Extension Methods
Constructors
StringContent(string)
Creates a new instance of the StringContent class.
public StringContent(string content)
Parameters
content
stringThe content used to initialize the StringContent.
Remarks
The media type for the StringContent created defaults to text/plain.
StringContent(string, Encoding)
Creates a new instance of the StringContent class.
public StringContent(string content, Encoding encoding)
Parameters
content
stringThe content used to initialize the StringContent.
encoding
EncodingThe encoding to use for the content.
Remarks
The media type for the StringContent created defaults to text/plain.
StringContent(string, Encoding, string)
Creates a new instance of the StringContent class.
public StringContent(string content, Encoding encoding, string mediaType)
Parameters
content
stringThe content used to initialize the StringContent.
encoding
EncodingThe encoding to use for the content.
mediaType
stringThe media type to use for the content.