@contentauth/c2pa-js
    Preparing search index...
    • Downloads a trust resource as raw text, including empty content, using the same bounded transport as Context's trust-resource resolution.

      Applies TrustFetchOptions' retry, response-size, cancellation and HTTPS policies. A fixed deadline covers requests, retry delays and body consumption, rejecting with a TimeoutError and aborting the operation even if the fetch implementation ignores cancellation.

      Concurrent calls with the same URL and effective policy share a pending request when using global fetch. Custom fetch implementations are always isolated. Completed responses are not cached.

      No certificate/content validation or fallback is performed. Callers decide whether empty content is valid, how to validate certificates, and whether to substitute fallback data. resolveTrustSettings adds its own PEM checks.

      Parameters

      • url: string

        Resource URL. Must be HTTPS when requireHttps is enabled.

      • Optionaloptions: TrustFetchOptions

        Optional trust-resource fetch policy.

      Returns Promise<string>

      The downloaded text, unchanged.

      Synchronously for a malformed URL or invalid numeric fetch options. Fetch, timeout, cancellation and response-size failures reject the promise.