RetrievalContext

open class RetrievalContext

This RetrievalContext holds all the necessary information that is needed to validate a validatable object. According to the requirements in the specification we probably need access to the following information:

  • The (parsed) JSON containing the provider metadata; see RetrievalContext.json

  • The filename of the JSON

  • The URL where it was downloaded (both to check whether a TLP:WHITE is accessible and/or a TLP:RED is not accessible and whether TLS is used); see RetrievalContext.httpResponse

  • The HTTP headers used in the HTTP communication to check for redirects; or the complete HTTP request; see RetrievalContext.httpResponse)

Constructors

Link copied to clipboard
constructor()

Properties

Link copied to clipboard
var httpResponse: <Error class: unknown class>?

The HTTP response used to retrieve the json.

Link copied to clipboard
var json: Any?

The document to validate.

Functions

Link copied to clipboard

A callback that can be used to set RetrievalContext.json.

Link copied to clipboard
fun RetrievalContext?.responseCallback(): (<Error class: unknown class>) -> Unit

A callback that can be used to set RetrievalContext.httpResponse.