Urdl C++ Library

PrevUpHomeNext
istream::istream (3 of 3 overloads)

Constructs an object of class istream.

explicit istream(
    const url & u,
    const option_set & options);

Parameters

u

The URL to open.

options

The options to be set on the stream.

Remarks

Initializes the base class with std::basic_istream<char>(sb), where sb is an object of class istreambuf stored within the class. It also performs rdbuf()->set_options(options), then opens sb by performing sb.open(u) and, if that fails (returns a null pointer), calls setstate(failbit).

Example

urdl::option_set options;
options.set_option(urdl::http::max_redirects(1));
urdl::istream is("http://www.boost.org", options);

PrevUpHomeNext