StringContent Constructor (String^, Encoding^)

.NET Framework (current version)
 

Creates a new instance of the StringContent class.

Namespace:   System.Net.Http
Assembly:  System.Net.Http (in System.Net.Http.dll)

public:
StringContent(
	String^ content,
	Encoding^ encoding
)

Parameters

content
Type: System::String^

The content used to initialize the StringContent.

encoding
Type: System.Text::Encoding^

The encoding to use for the content.

The media type for the StringContent created defaults to text/plain.

Universal Windows Platform
Available since 8
.NET Framework
Available since 4.5
Portable Class Library
Supported in: portable .NET platforms
Windows Phone
Available since 8.1
Return to top
Show: