D issues are now tracked on GitHub. This Bugzilla instance remains as a read-only archive.
Issue 4766 - Function to load a whole HTML page
Summary: Function to load a whole HTML page
Status: RESOLVED WORKSFORME
Alias: None
Product: D
Classification: Unclassified
Component: phobos (show other issues)
Version: D2
Hardware: All All
: P2 enhancement
Assignee: No Owner
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-08-29 19:35 UTC by bearophile_hugs
Modified: 2020-03-21 03:56 UTC (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description bearophile_hugs 2010-08-29 19:35:02 UTC
This page and the long (and partially wrong) D2 entry:
http://rosettacode.org/wiki/Web_scraping#D

shows that probably Phobos needs a simple function to download a whole HTML page given just the URL. It's a common basic need.

See the Python version:

import urllib
page = urllib.urlopen("http://tycho.usno.navy.mil/cgi-bin/timer.pl")
Comment 1 Justin Whear 2014-06-06 16:24:00 UTC
bearophile: Can you close this now that we have the high-level cURL interface?  D version:

import std.net.curl;
void main()
{
	auto page = get("http://tycho.usno.navy.mil/cgi-bin/timer.pl");
}