fetchDocument

suspend fun fetchDocument(url: String, ctx: RetrievalContext): <Error class: unknown class><<Error class: unknown class>>

Fetch and parse a CSAF JSON document from a given URL.

Return

An instance of Csaf, wrapped in a Result monad, if successful. A failed Result wrapping the thrown Throwable in case of an error.

Parameters

url

The URL where the CSAF document is found.

ctx

A RetrievalContext that is automatically filled with the HTTP response and body of the calls made in this function.