SnippetWebLoader

Defines the contract for loading and resolving an url into structured content.

Implementations are responsible for:

  • Executing HTTP requests using the given target URL and headers

  • Following redirects until a final, resolved URL is reached

  • Optionally parsing or transforming the received content

  • Returning metadata describing the final result

This abstraction decouples higher-level WebView logic from the underlying HTTP/redirect handling and content resolution.

Functions

Link copied to clipboard
abstract suspend fun response(target: String, headers: Map<String, String> = emptyMap()): ResponseMetaData

Loads the given target URL, applying any provided headers, and resolves the final state after redirects.