From b61d44950bb0cef1f121ed3a08971b6458097d7f Mon Sep 17 00:00:00 2001 From: purocean Date: Thu, 23 Dec 2021 22:44:40 +0800 Subject: [PATCH] feat: add `ctx.api.fetchHttp` method --- src/renderer/support/api.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/renderer/support/api.ts b/src/renderer/support/api.ts index f7a27027..1eb3155b 100644 --- a/src/renderer/support/api.ts +++ b/src/renderer/support/api.ts @@ -7,7 +7,7 @@ export type ApiResult = { data: T, } -async function fetchHttp (input: RequestInfo, init?: RequestInit) { +export async function fetchHttp (input: RequestInfo, init?: RequestInit) { const response = await fetch(input, init) if (!response.headers.get('content-type')?.includes('json')) {