v2026.5.3
All Bundles
Bundle Shared networking types used across all HTTP libraries: Url (parsing and construction), Response (status code, headers, body), Cookie, and WebDownloader for streaming downloads. Compile with -lib net.

WebDownloader

Downloads web content

Operations

Download # function

Downloads content for the given URLs

function : Download(urls:Vector<Url>, headers:Map<String,String>) ~ Vector<Pair<Url,ByteArrayRef>>

Parameters

NameTypeDescription
urlsVector<Url>list of URLs to download content from
headersMap<String,String>key/value headers

Return

TypeDescription
Vector<Pair<Url,ByteArrayRef>>map of URLs and content

Example

urls := Vector->New()<Web.HTTP.Url>;
urls->AddBack(Web.HTTP.Url->New("https://example.com/a"));
urls->AddBack(Web.HTTP.Url->New("https://example.com/b"));
results := Web.HTTP.WebDownloader->Download(urls, Nil);
each(result in results) {
  result->GetFirst()->GetUrl()->PrintLine();
  result->GetSecond()->Get()->Size()->PrintLine();
};