Skip to content

Using cached remote context #20

@jg10-mastodon-social

Description

@jg10-mastodon-social

My understanding is that this library will fetch a remote context every time a document with a remote context is parsed.

This can lead to the context server replying with 429 Too many requests, and parsing failing.

A workaround is to download a local copy of the context in question and replace it before parsing through string operations, e.g.

fileName <- "activitystreams.jsonld"
context <- readChar(fileName, file.info(fileName)$size)
contents <- sub('"https://www.w3.org/ns/activitystreams"', context, contents)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions