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

Provides an HTTP-specific implementation of the WebResponse class More...

Public Member Functions

 RLIB_PROPERTY_GET (String Cookies, GetAllCookies)
 Gets the cookies that are associated with this response More...
 
String GetAllCookies ()
 Gets the cookies that are associated with this response More...
 
String GetAllResponseHeaders ()
 获取与响应一起返回的所有标头的内容 More...
 
String GetResponseHeader (LPCSTR headerName, intptr_t length=-1)
 获取与响应一起返回的标头的内容 More...
 
ResponseStreamGetResponseStream ()
 获取流,该流用于读取来自服务器的响应体 More...
 
RLIB_DEPRECATED void Close ()
 关闭响应流 More...
 
HttpException * GetLastException ()
 获取HttpResponse发生的异常信息 More...
 

Static Public Member Functions

static HttpResponseCreate (IO::MemoryStream *responseData, bool ignoreStatus, bool ignoreHeaders)
 根据指定的 MemoryStream 实例初始化 HttpResponse 类的新实例 More...
 
static HttpResponseCreate (IO::MemoryStream *responseData, DecompressionMethod automaticDecompression, bool ignoreStatus, bool ignoreHeaders)
 根据指定的 MemoryStream 实例和 解压缩类型 初始化 HttpResponse 类的新实例 More...
 

Public Attributes

 RLIB_DECLARE_DYNCREATE
 
intptr_t ContentLength
 获取响应内容的长度 More...
 
intptr_t StatusCode
 获取响应的状态 参见http://msdn.microsoft.com/zh-cn/library/system.net.httpstatuscode.aspx More...
 
String ContentType
 获取响应的内容类型 More...
 
WebHeaderCollection Headers
 获取来自服务器的与此响应关联的标头 More...
 
String ProtocolVer
 获取响应中使用的 HTTP 协议的版本 More...
 
String StatusDescription
 获取与响应一起返回的状态说明 More...
 
LPURI ResponseUri
 获取响应请求的 Internet 资源的 URI 如果请求被重定向, 将返回最终地址 More...
 

Detailed Description

Provides an HTTP-specific implementation of the WebResponse class

Member Function Documentation

RLIB_DEPRECATED void System::Net::HttpResponse::Close ( )
inline

关闭响应流

HttpResponse * HttpResponse::Create ( IO::MemoryStream responseData,
bool  ignoreStatus,
bool  ignoreHeaders 
)
static

根据指定的 MemoryStream 实例初始化 HttpResponse 类的新实例

HttpResponse * HttpResponse::Create ( IO::MemoryStream responseData,
DecompressionMethod  automaticDecompression,
bool  ignoreStatus,
bool  ignoreHeaders 
)
static

根据指定的 MemoryStream 实例和 解压缩类型 初始化 HttpResponse 类的新实例

String HttpResponse::GetAllCookies ( )

Gets the cookies that are associated with this response

String HttpResponse::GetAllResponseHeaders ( )

获取与响应一起返回的所有标头的内容

HttpException * HttpResponse::GetLastException ( )

获取HttpResponse发生的异常信息

String HttpResponse::GetResponseHeader ( LPCSTR  headerName,
intptr_t  length = -1 
)

获取与响应一起返回的标头的内容

ResponseStream * HttpResponse::GetResponseStream ( )

获取流,该流用于读取来自服务器的响应体

System::Net::HttpResponse::RLIB_PROPERTY_GET ( String  Cookies,
GetAllCookies   
)

Gets the cookies that are associated with this response

Member Data Documentation

intptr_t System::Net::HttpResponse::ContentLength

获取响应内容的长度

Warning
字段 Content-Length 并不会影响该值
String System::Net::HttpResponse::ContentType

获取响应的内容类型

WebHeaderCollection System::Net::HttpResponse::Headers

获取来自服务器的与此响应关联的标头

String System::Net::HttpResponse::ProtocolVer

获取响应中使用的 HTTP 协议的版本

LPURI System::Net::HttpResponse::ResponseUri

获取响应请求的 Internet 资源的 URI 如果请求被重定向, 将返回最终地址

intptr_t System::Net::HttpResponse::StatusCode

获取响应的状态 参见http://msdn.microsoft.com/zh-cn/library/system.net.httpstatuscode.aspx

String System::Net::HttpResponse::StatusDescription

获取与响应一起返回的状态说明


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