RLib  5.7
RLib - an opensource, lightweight and multi-platform framework for cpp programming
System::Net::WebClient Class Reference

提供用于将数据发送到由 URI 标识的资源及从这样的资源接收数据的常用方法 More...

Static Public Member Functions

static HttpRequestGetHttpRequest (const String &Url)
 为指定资源返回一个 HttpRequest 对象, delete 以释放对象 More...
 
static ResponseStreamGetRawResponseStream (const String &Url, HttpRequest *pRequest IN=nullptr)
 获取具有指定 URI 的原始响应流 More...
 
static ResponseStreamGetResponseStream (const String &Url, HttpRequest *pRequest IN=nullptr, HttpResponse **ppResponse OUT=nullptr)
 获取具有指定 URI 的资源流 如果 ppResponse != null, 则返回的 ResponseStream 无须二次释放 More...
 
static String GetResponseText (const String &Url, HttpRequest *pRequest IN=nullptr, HttpResponse **ppResponse OUT=nullptr)
 获取具有指定 URI 的文本 More...
 
static ResponseStreamPostRawResponseStream (const String &Url, const String &Data, HttpRequest *pRequest IN=nullptr)
 获取具有指定 URI 的原始响应流 More...
 
static ResponseStreamPostResponseStream (const String &Url, const String &Data, HttpRequest *pRequest IN=nullptr, HttpResponse **ppResponse OUT=nullptr)
 获取具有指定 URI 的资源流 如果 ppResponse != null, 则返回的 ResponseStream 无须二次释放 More...
 
static String PostResponseText (const String &Url, const String &Data, HttpRequest *pRequest IN=nullptr, HttpResponse **ppResponse OUT=nullptr)
 获取具有指定 URI 的文本 More...
 
static void WriteRequestStream (HttpRequest *pRequest, const String &Data)
 将文本写入请求流(body), 并设置方法为 POST More...
 
static bool DownloadFile (const String &Url, const String &FilePath, HttpRequest *pRequest IN=nullptr, HttpResponse **ppResponse OUT=nullptr)
 将具有指定 URI 的资源下载到本地文件 More...
 

Detailed Description

提供用于将数据发送到由 URI 标识的资源及从这样的资源接收数据的常用方法

Member Function Documentation

bool WebClient::DownloadFile ( const String Url,
const String FilePath,
HttpRequest *pRequest  IN = nullptr,
HttpResponse **ppResponse  OUT = nullptr 
)
static

将具有指定 URI 的资源下载到本地文件

HttpRequest * WebClient::GetHttpRequest ( const String Url)
static

为指定资源返回一个 HttpRequest 对象, delete 以释放对象

ResponseStream * WebClient::GetRawResponseStream ( const String Url,
HttpRequest *pRequest  IN = nullptr 
)
static

获取具有指定 URI 的原始响应流

ResponseStream * WebClient::GetResponseStream ( const String Url,
HttpRequest *pRequest  IN = nullptr,
HttpResponse **ppResponse  OUT = nullptr 
)
static

获取具有指定 URI 的资源流 如果 ppResponse != null, 则返回的 ResponseStream 无须二次释放

String WebClient::GetResponseText ( const String Url,
HttpRequest *pRequest  IN = nullptr,
HttpResponse **ppResponse  OUT = nullptr 
)
static

获取具有指定 URI 的文本

ResponseStream * WebClient::PostRawResponseStream ( const String Url,
const String Data,
HttpRequest *pRequest  IN = nullptr 
)
static

获取具有指定 URI 的原始响应流

ResponseStream * WebClient::PostResponseStream ( const String Url,
const String Data,
HttpRequest *pRequest  IN = nullptr,
HttpResponse **ppResponse  OUT = nullptr 
)
static

获取具有指定 URI 的资源流 如果 ppResponse != null, 则返回的 ResponseStream 无须二次释放

String WebClient::PostResponseText ( const String Url,
const String Data,
HttpRequest *pRequest  IN = nullptr,
HttpResponse **ppResponse  OUT = nullptr 
)
static

获取具有指定 URI 的文本

void WebClient::WriteRequestStream ( HttpRequest pRequest,
const String Data 
)
static

将文本写入请求流(body), 并设置方法为 POST


The documentation for this class was generated from the following files: