1
2
3
4
5
6
7
8
9
10
11
12
import { fetch as fetch_ } from "https://esm.town/v/std/fetch?v=4";
import { fetch } from "https://esm.town/v/vladimyr/fetch";
import ky from "npm:ky";
const ip = await ky("https://httpbun.com/ip.json", { fetch }).json();
console.log(ip);
{
console.log();
const ip = await ky("https://httpbun.com/ip.json", { fetch: fetch_ }).json();
console.log(ip);
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
import { fetch as fetch_ } from "https://esm.town/v/std/fetch?v=4";
import { fetch } from "https://esm.town/v/vladimyr/fetch";
import { createFetch } from "npm:ofetch";
const ofetch = createFetch({ fetch });
const ip = await ofetch("https://httpbun.com/ip.json");
console.log(ip);
{
console.log();
const ofetch = createFetch({ fetch: fetch_ });
const ip = await ofetch("https://httpbun.com/ip.json");
console.log(ip);
}
1
Next