Skip to main content
This release is 0 versions behind 1.3.0 — the latest version of @fedify/fedify. Jump to latest

@fedify/fedify@1.3.0-dev.578+6bbdcb1d
Built and signed on GitHub Actions

An ActivityPub/fediverse server framework

This package works with Node.js, Deno, Bun
This package works with Node.js
This package works with Deno
This package works with Bun
JSR Score
100%
Published
a week ago (1.3.0-dev.578+6bbdcb1d)
function getNodeInfo
getNodeInfo(
url: URL | string,
options?: GetNodeInfoOptions & { parse?: "strict" | "best-effort"; },
): Promise<NodeInfo | undefined>

Fetches a NodeInfo document from the given URL.

Parameters

url: URL | string

The base URL of the server. If options.direct is turned off (default), the NodeInfo document will be fetched from the .well-known location of this URL (hence the only origin of the URL is used). If options.direct is turned on, the NodeInfo document will be fetched from the given URL.

optional
options: GetNodeInfoOptions & { parse?: "strict" | "best-effort"; }

Options for fetching the NodeInfo document.

Return Type

Promise<NodeInfo | undefined>

The NodeInfo document if it could be fetched successfully. Otherwise, undefined is returned.

getNodeInfo(
url: URL | string,
options: GetNodeInfoOptions & { parse: "none"; },
): Promise<JsonValue | undefined>

Fetches a NodeInfo document from the given URL.

Parameters

url: URL | string

The base URL of the server. If options.direct is turned off (default), the NodeInfo document will be fetched from the .well-known location of this URL (hence the only origin of the URL is used). If options.direct is turned on, the NodeInfo document will be fetched from the given URL.

options: GetNodeInfoOptions & { parse: "none"; }

Options for fetching the NodeInfo document.

Return Type

Promise<JsonValue | undefined>

The NodeInfo document if it could be fetched successfully. Otherwise, undefined is returned.

Add Package

deno add jsr:@fedify/fedify

Import symbol

import { getNodeInfo } from "@fedify/fedify";

---- OR ----

Import directly with a jsr specifier

import { getNodeInfo } from "jsr:@fedify/fedify";

Add Package

npx jsr add @fedify/fedify

Import symbol

import { getNodeInfo } from "@fedify/fedify";

Add Package

yarn dlx jsr add @fedify/fedify

Import symbol

import { getNodeInfo } from "@fedify/fedify";

Add Package

pnpm dlx jsr add @fedify/fedify

Import symbol

import { getNodeInfo } from "@fedify/fedify";

Add Package

bunx jsr add @fedify/fedify

Import symbol

import { getNodeInfo } from "@fedify/fedify";