RHTTPHeaders headers = resp.GetHeaderCollection ( );
THTTPHdrVal aHeaderValue;
TRAPD(error,GetHeaderL (headers, _L8("Content-Length"), aHeaderValue ))
void GetHeaderL(RHTTPHeaders aHeaders,
const TDesC8 &aHeaderField, THTTPHdrVal &aHeaderValue )
{
RStringPool string_pool = iSession.StringPool ( );
RStringF contLength = string_pool.OpenFStringL (aHeaderField );
aHeaders.GetField (contLength, 0, aHeaderValue );
contLength.Close ( );
}
//可用获取到请求文件的大小,比如下载文件时可用拿到文件的大小.
阅读(722) | 评论(0) | 转发(0) |