From 510fd8cbe53abb39cba2c7cbaaefcf2783dc0066 Mon Sep 17 00:00:00 2001 From: "netop://ウィビ" Date: Fri, 24 Apr 2026 16:37:33 -0700 Subject: Implement v0.6-1.0: shortcuts, format, export/import, splitter, timing, APQ - v0.6: matchShortcut + format(); Cmd+Shift+Enter/W/F + Cmd+Alt+arrows - v0.7: SessionStore.exportAll/importTabs with version-1 validator - v0.8: Splitter component + four resize handles persisted under layout.* - v0.10: createApqFetcher (HTTP-only) wrapping shared http-body helpers - Drop .svelte re-exports from index.ts for multi-entry JSR/npm publishing --- source/library/fetcher/http.ts | 19 +++++-------------- 1 file changed, 5 insertions(+), 14 deletions(-) (limited to 'source/library/fetcher/http.ts') diff --git a/source/library/fetcher/http.ts b/source/library/fetcher/http.ts index 3138226..64322f2 100644 --- a/source/library/fetcher/http.ts +++ b/source/library/fetcher/http.ts @@ -3,6 +3,7 @@ /*** UTILITY ------------------------------------------ ***/ +import { buildHeaders, postJson } from "./http-body.ts"; import type { Fetcher, FetcherOptions } from "./types.ts"; /*** EXPORT ------------------------------------------- ***/ @@ -11,20 +12,10 @@ export function createHttpFetcher(options: FetcherOptions): Fetcher { const fetchImpl = options.fetch ?? globalThis.fetch; return async (req) => { - const response = await fetchImpl(options.url, { - body: JSON.stringify({ - operationName: req.operationName, - query: req.query, - variables: req.variables - }), - headers: { - "Content-Type": "application/json", - ...options.headers, - ...req.headers - }, - method: "POST" + return await postJson(fetchImpl, options.url, buildHeaders(options, req), { + operationName: req.operationName, + query: req.query, + variables: req.variables }); - - return await response.json(); }; } -- cgit v1.2.3