Versions
- Open: VersionChanges from v4 to v5+0-1⦚ 9 unchanged lines ⦚url = normalizeURL(url.toString());let headers = new Headers(options?.headers ?? {});
headers.set("accept", "application/json");if (options?.bearer) {headers.set("authorization", `Bearer ${options.bearer}`);}⦚ 8 unchanged lines ⦚⦚ 9 unchanged lines ⦚url = normalizeURL(url.toString());let headers = new Headers(options?.headers ?? {});if (options?.bearer) {headers.set("authorization", `Bearer ${options.bearer}`);}⦚ 8 unchanged lines ⦚ - Open: VersionChanges from v3 to v4+1-1⦚ 7 unchanged lines ⦚},) => {
let headers = new Headers(options?.headers ?? {});headers.set("accept", "application/json");if (options?.bearer) {headers.set("authorization", `Bearer ${options.bearer}`);}let fetch = options?.fetch ?? globalThis.fetch;url = normalizeURL(url.toString());let resp = await fetch(url, {redirect: "follow",⦚ 5 unchanged lines ⦚⦚ 7 unchanged lines ⦚},) => {url = normalizeURL(url.toString());let headers = new Headers(options?.headers ?? {});headers.set("accept", "application/json");if (options?.bearer) {headers.set("authorization", `Bearer ${options.bearer}`);}let fetch = options?.fetch ?? globalThis.fetch;let resp = await fetch(url, {redirect: "follow",⦚ 5 unchanged lines ⦚ - Open: VersionChanges from v2 to v3+1-1⦚ 14 unchanged lines ⦚let fetch = options?.fetch ?? globalThis.fetch;url = normalizeURL(url.toString());
let resp = await fetch(url), {redirect: "follow",...options,⦚ 4 unchanged lines ⦚⦚ 14 unchanged lines ⦚let fetch = options?.fetch ?? globalThis.fetch;url = normalizeURL(url.toString());let resp = await fetch(url, {redirect: "follow",...options,⦚ 4 unchanged lines ⦚ - Open: VersionChanges from v1 to v2+1-1⦚ 13 unchanged lines ⦚}let fetch = options?.fetch ?? globalThis.fetch;
url = normalizeURL(url.toString();let resp = await fetch(url), {redirect: "follow",⦚ 5 unchanged lines ⦚⦚ 13 unchanged lines ⦚}let fetch = options?.fetch ?? globalThis.fetch;url = normalizeURL(url.toString());let resp = await fetch(url), {redirect: "follow",⦚ 5 unchanged lines ⦚ - Open: VersionChanges from v0 to v1+18-4import { normalizeURL } from "https://esm.town/v/stevekrouse/normalizeURL";
export const fetchText = async (url: string, options?: any) => {let f = await fetch(normalizeURL(url), {redirect: "follow",...(options || {}),});return f.text();};import { normalizeURL } from "https://esm.town/v/stevekrouse/normalizeURL";export const fetchText = async (url: string | URL,options?: RequestInit & {bearer?: string;fetch?: typeof fetch;},) => {let headers = new Headers(options?.headers ?? {});headers.set("accept", "application/json");if (options?.bearer) {headers.set("authorization", `Bearer ${options.bearer}`);}let fetch = options?.fetch ?? globalThis.fetch;url = normalizeURL(url.toString();let resp = await fetch(url), {redirect: "follow",...options,headers,});return resp.text();}; - Open: Version+9-0import { normalizeURL } from "https://esm.town/v/stevekrouse/normalizeURL";export const fetchText = async (url: string, options?: any) => {let f = await fetch(normalizeURL(url), {redirect: "follow",...(options || {}),});return f.text();};
Updated: March 30, 2024