class

PrismatIQ::URLFetcher

Inherits Reference < Object

Dedicated HTTP fetcher with SSRF protection, rate limiting, and streaming.

Extracted from ThemeExtractor to satisfy Single Responsibility Principle: ThemeExtractor orchestrates theme extraction; URLFetcher handles HTTP concerns.

Constructors

new(config : Config = Config.default)

Instance methods

fetch(uri : URI, options : ThemeOptions) : Slice(UInt8) | Nil

Fetches content from a URI with SSRF validation, rate limiting, and size limits. Returns the response body as a Slice(UInt8), or nil on any failure.