System::Net::WebClient 类

WebClient class

WebClient provides common methods for sending and receiving data. Objects of this class should only be allocated using System::MakeObject() function. Never create instance of this type on stack or using operator new, as it will result in runtime errors and/or assertion faults. Always wrap this class into System::SmartPtr pointer and use this pointer to pass it to functions as argument.

class WebClient : public System::ComponentModel::Component

方法

方法描述
DownloadData(const String&) const将指定资源下载为字节数组。
DownloadData(const SharedPtr<Uri>&) const将指定资源下载为字节数组。
DownloadString(const String&) const将指定资源下载为字符串。
DownloadString(const SharedPtr<Uri>&) const将指定资源下载为字符串。
get_Encoding() const获取用于下载或上传字符串的编码。
set_Encoding(const SharedPtr<Text::Encoding>&)设置用于下载或上传字符串的编码。
set_UseDefaultCredentials(bool)未实现。
WebClient()RTTI 信息。
~WebClient()销毁当前实例。

另见