Skip to content

Commit

Permalink
remove base64
Browse files Browse the repository at this point in the history
  • Loading branch information
dojyorin committed Jun 11, 2024
1 parent c2faedb commit de78a56
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions src/pure/fetch.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
import {base64Encode} from "./base64.ts";

interface ResponseType {
"text": string;
"base64": string;
"json": unknown;
"form": FormData;
"byte": Uint8Array;
Expand Down Expand Up @@ -56,7 +53,6 @@ export async function fetchExtend<T extends keyof ResponseType>(path:string, typ

switch(type){
case "text": return <ResponseType[T]>await response.text();
case "base64": return <ResponseType[T]>base64Encode(new Uint8Array(await response.arrayBuffer()));
case "json": return <ResponseType[T]>await response.json();
case "form": return <ResponseType[T]>await response.formData();
case "byte": return <ResponseType[T]>new Uint8Array(await response.arrayBuffer());
Expand Down

0 comments on commit de78a56

Please sign in to comment.