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
contentstringThe 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
contentstringThe content used to initialize the StringContent.
encodingEncodingThe 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
contentstringThe content used to initialize the StringContent.
encodingEncodingThe encoding to use for the content.
mediaTypestringThe media type to use for the content.