fetchProvider

suspend fun fetchProvider(url: String, ctx: RetrievalContext? = null): <Error class: unknown class><<Error class: unknown class>>

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

Return

An instance of Provider, 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 provider document is found.

ctx

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