Dela via


HttpStringContent Constructors

Definition

Overloads

HttpStringContent(String)

Initializes a new instance of the HttpStringContent class with the specified content.

HttpStringContent(String, UnicodeEncoding)

Initializes a new instance of the HttpStringContent class with the specified content and encoding.

HttpStringContent(String, UnicodeEncoding, String)

Initializes a new instance of the HttpStringContent class with the specified content, encoding, and media type.

HttpStringContent(String)

Initializes a new instance of the HttpStringContent class with the specified content.

public:
 HttpStringContent(Platform::String ^ content);
 HttpStringContent(winrt::hstring const& content);
public HttpStringContent(string content);
function HttpStringContent(content)
Public Sub New (content As String)

Parameters

content
String

Platform::String

winrt::hstring

The content used to initialize the HttpStringContent.

Remarks

The character encoding in the Content-Type header for the HttpStringContent created defaults to UTF-8.

The media type in the Content-Type header for the HttpStringContent created defaults to text/plain.

See also

Applies to

HttpStringContent(String, UnicodeEncoding)

Initializes a new instance of the HttpStringContent class with the specified content and encoding.

public:
 HttpStringContent(Platform::String ^ content, UnicodeEncoding encoding);
 HttpStringContent(winrt::hstring const& content, UnicodeEncoding const& encoding);
public HttpStringContent(string content, UnicodeEncoding encoding);
function HttpStringContent(content, encoding)
Public Sub New (content As String, encoding As UnicodeEncoding)

Parameters

content
String

Platform::String

winrt::hstring

The content used to initialize the HttpStringContent.

encoding
UnicodeEncoding

The encoding to use for the content.

Remarks

The media type in the Content-Type header for the HttpStringContent created defaults to text/plain.

See also

Applies to

HttpStringContent(String, UnicodeEncoding, String)

Initializes a new instance of the HttpStringContent class with the specified content, encoding, and media type.

public:
 HttpStringContent(Platform::String ^ content, UnicodeEncoding encoding, Platform::String ^ mediaType);
 HttpStringContent(winrt::hstring const& content, UnicodeEncoding const& encoding, winrt::hstring const& mediaType);
public HttpStringContent(string content, UnicodeEncoding encoding, string mediaType);
function HttpStringContent(content, encoding, mediaType)
Public Sub New (content As String, encoding As UnicodeEncoding, mediaType As String)

Parameters

content
String

Platform::String

winrt::hstring

The content used to initialize the HttpStringContent.

encoding
UnicodeEncoding

The encoding to use for the content.

mediaType
String

Platform::String

winrt::hstring

The media type to use for the content.

Remarks

The media type in the Content-Type header for the HttpStringContent created is set to the value of the mediaType parameter.

See also

Applies to