Spaces:
Paused
Paused
Download scripts/scratch.mjs from igorkurgin/omniroute: direct link, hf CLI and curl.
- Browser
- Download file 485 Bytes
-
https://huggingface.co/spaces/igorkurgin/omniroute/resolve/main/scripts/scratch.mjs
- Command line
-
hf download hf://spaces/igorkurgin/omniroute/scripts/scratch.mjs
-
curl -L -o scratch.mjs https://huggingface.co/spaces/igorkurgin/omniroute/resolve/main/scripts/scratch.mjs
485 Bytes
| import { test } from "node:test"; | |
| import assert from "node:assert"; | |
| import { providerNodesValidateRoute } from "./src/app/api/provider-nodes/validate/route.js"; | |
| const req = new Request("http://localhost/api/provider-nodes/validate", { | |
| method: "POST", | |
| headers: { "Content-Type": "application/json" }, | |
| body: JSON.stringify({ baseUrl: "", apiKey: "" }), | |
| }); | |
| const res = await providerNodesValidateRoute.POST(req); | |
| const data = await res.json(); | |
| console.dir(data, { depth: null }); | |