UNPKG

link-enricher

Version:

Fetch oEmbed, Opeh Graph, etc info for links

6 lines (5 loc) 421 B
import { Response, Options } from 'got'; export type FetchOptions = Pick<Options, 'agent' | 'headers' | 'hooks' | 'cookieJar'>; export declare const getHead: (link: string, options?: FetchOptions) => Promise<null | Response>; export declare const getHtml: (link: string, reqOptions?: FetchOptions) => Promise<string | null>; export declare const getJSON: (link: string, reqOptions?: FetchOptions) => Promise<any | null>;