W3C home > Mailing lists > Public > www-lib@w3.org > October to December 2000

a simple question about HTTP GET

From: n_d <n_d@sina.com>
Date: Sun, 17 Dec 2000 22:24:03 +0800
Message-ID: <20001217142403.11371.qmail@sina.com>
To: www-lib@w3.org
   I'm a newbie to libwww. I have a problem in do HTTP GET 
operations, what I wanna do just is to fetch a html page and
all links within the page. 

part of my code:
HTProfile_newHTMLNoCacheClient("mytest", "1.0");
HTNet_addAfter(terminate_handler, NULL, NULL, HT_ALL, HT_FILTER_LAST);
HTRequest_setOutputFormat(request, WWW_SOURCE);
anchor = HTAnchor_findAddress(url);
chunk = HTLoadAnchorToChunk(anchor, request);

The trouble is I can't got both html page and links.
Upper code running result is I can get html page in variable "chunk"
But CANNOT get links -- function "foundlink" which I registered was
never called.

If I got rid of "HTRequest_setOutputFormat(request, WWW_SOURCE)"
the result is just opposite.

Can I get both html page and links? Any help will be appreciated!


新浪免费电子邮箱 http://mail.sina.com.cn

花样年华  为青春保鲜!  
Received on Sunday, 17 December 2000 09:15:50 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 21:33:53 UTC