@comunica/actor-dereference-http

A http dereference actor

Usage no npm install needed!

<script type="module">
  import comunicaActorDereferenceHttp from 'https://cdn.skypack.dev/@comunica/actor-dereference-http';
</script>

README

Comunica Http Dereference Actor

npm version

An Dereference actor that resolves the URL using the HTTP bus.

An Dereference actor implementation for Comunica that resolves the URL using the HTTP bus.

This module is part of the Comunica framework, and should only be used by developers that want to build their own query engine.

Click here if you just want to query with Comunica.

Install

$ yarn add @comunica/actor-dereference-http

Configure

After installing, this package can be added to your engine's configuration as follows:

{
  "@context": [
    ...
    "https://linkedsoftwaredependencies.org/bundles/npm/@comunica/actor-dereference-http/^2.0.0/components/context.jsonld"  
  ],
  "actors": [
    ...
    {
      "@id": "urn:comunica:default:dereference/actors#http",
      "@type": "ActorDereferenceHttp",
      "beforeActors": { "@id": "urn:comunica:default:dereference/actors#fallback" },
      "mediatorHttp": { "@id": "urn:comunica:default:http/mediators#main" },
      "maxAcceptHeaderLength": 1024,
      "maxAcceptHeaderLengthBrowser": 128,
    }
  ]
}

Config Parameters

  • mediatorHttp: A mediator over the HTTP bus.
  • maxAcceptHeaderLength: The maximum allowed accept header value length for non-browser environments, defaults to 1024.
  • maxAcceptHeaderLengthBrowser: The maximum allowed accept header value length for browser environments, defaults to 128.