System::Net::Http::HttpClientHandler 类

HttpClientHandler class

表示 HttpClient 类使用的默认消息处理程序。此类的对象只能使用 System::MakeObject() 函数分配。切勿在栈上或使用 operator new 创建此类型的实例,因为这会导致运行时错误和/或断言故障。始终将此类包装到 System::SmartPtr 指针中,并使用该指针将其作为参数传递给函数。

class HttpClientHandler : public System::Net::Http::HttpMessageHandler

方法

方法描述
Dispose() override不执行任何操作。
get_CookieContainer()获取用于存储服务器 Cookie 的 Cookie 容器。
get_Credentials()获取身份验证信息。
HttpClientHandler()RTTI 信息。
Send(System::SharedPtr<HttpRequestMessage>) overrideRTTI 信息。
set_CookieContainer(System::SharedPtr<System::Net::CookieContainer>)设置用于存储服务器 Cookie 的 Cookie 容器。
set_Credentials(System::SharedPtr<ICredentials>)设置身份验证信息。
set_Proxy(System::SharedPtr<IWebProxy>)设置代理信息。
set_Timeout(int32_t)获取请求超时的毫秒时间量。
set_UseCookies(bool)设置指示当前实例是否使用 Cookie 容器来存储服务器 Cookie,以及在发送请求时是否使用服务器 Cookie 的值。
set_UseProxy(bool)设置指示当前实例是否在发送请求时使用代理的值。

另见