View source code
Display the source code in std/net/curl.d from which this page was generated on
github.
Improve this page
Quickly fork, edit online, and submit a pull request for this page.
Requires a signed-in GitHub account. This works well for small changes.
If you'd like to make larger changes you may want to consider using
local clone.
Page wiki
View or edit the community-maintained wiki page associated with this page.
Function std.net.curl.byLine
HTTP
/FTP
fetch content as a range of lines.
A range of lines is returned when the request is complete. If the method or
other request properties is to be customized then set the
parameter
with a conn
HTTP
/FTP
instance that has these properties set.
Prototype
auto byLine(Conn, Terminator, Char)( const(char)[] url, KeepTerminator keepTerminator = KeepTerminator.no, Terminator terminator = '\x0a', Conn conn = Conn() ) if (isCurlConn!Conn && isSomeChar!Char && isSomeChar!Terminator);
Example
import std.net.curl, std.stdio; foreach (line; byLine("dlang.org")) writeln(line);
Parameters
Name | Description |
---|---|
url | The url to receive content from |
keepTerminator | KeepTerminator.yes signals that the line terminator should be
returned as part of the lines in the range. |
terminator | The character that terminates a line |
conn | The connection to use e.g. HTTP or FTP . |
Returns
A range of Char[] with the content of the resource pointer to by the URL
Authors
Jonas Drewsen. Some of the SMTP
code contributed by Jimmy Cao.