From c7d313b18db664fb03c2a64a2e7035e9813a0907 Mon Sep 17 00:00:00 2001 From: ikasoba <57828948+ikasoba@users.noreply.github.com> Date: Wed, 8 Nov 2023 01:44:26 +0900 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/utils/request.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/utils/request.ts b/src/utils/request.ts index ac036f1..54f795f 100644 --- a/src/utils/request.ts +++ b/src/utils/request.ts @@ -1,3 +1,5 @@ +import { decodeBase64 } from "encoding/base64.ts"; + export interface RequesterRequest { method: string; url: string; @@ -13,7 +15,7 @@ export const createRequester = (fetch: FetchApi) => { const res = await fetch(req.url, { method: req.method, headers: req.headers, - body: req.body, + body: req.body && decodeBase64(req.body), }); if (!res.ok) {