API / Minn\Http / Download

Download final readonly class

Minn\Http\Download · public/minn/src/Minn/Http/Download.php · 36 lines

A file the engine fetches for itself (a package, a language pack), over its Minn\Http client with the rules a download needs: https at every hop, one of the caller's host prefixes when given, no private address, and a body over the cap fails rather than being truncated. The messages are written for the person who asked for the download.

Constants and properties

privatereadonly Minn\Http $http

Promoted from the constructor.

Public

new__construct(Minn\Http $http = \Minn\Http::__set_state(array( 'within' => array ( ), 'fake' => NULL, 'refusal' => NULL, )))#
methodhttps(string $url, int $maxBytes, array $hostPrefixes = array ( ), string $userAgent = 'Minn Engine'): string#

The body at $url, following at most five redirects.

$hostPrefixeslist<string>URL prefixes every hop must start with (none: any https host)