1
2
3
4
5
6
7
8
9
10
11
12
import { paths } from "https://esm.town/v/pomdtr/openapi_schema";
import createClient2 from "npm:openapi-fetch";
export default function createClient(options?: {
baseUrl?: string;
token?: string;
}) {
return createClient2<paths>({
baseUrl: options?.baseUrl ?? "https://api.val.town",
headers: options?.token ? { Authorization: `Bearer ${options.token}` } : {},
});
}
Val Town is a social website to write and deploy JavaScript.
Build APIs and schedule functions from your browser.
Comments
Nobody has commented on this val yet: be the first!
May 2, 2024