-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
m.r
committed
Jan 31, 2024
1 parent
e86c60b
commit 1a9455a
Showing
23 changed files
with
1,310 additions
and
718 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
// import axios from "axios"; | ||
import fetch from "cross-fetch"; | ||
function str2ab(str: string) { | ||
var buf = new ArrayBuffer(str.length * 2); // 2 bytes for each char | ||
var bufView = new Uint16Array(buf); | ||
for (var i = 0, strLen = str.length; i < strLen; i++) { | ||
bufView[i] = str.charCodeAt(i); | ||
} | ||
return buf; | ||
} | ||
export async function callApi(url: string) { | ||
return await fetch(url).then((res) => { | ||
return res.arrayBuffer(); | ||
}); | ||
} | ||
export async function callApi2(url: string) { | ||
return await fetch(url).then((res) => { | ||
return res.arrayBuffer(); | ||
}); | ||
} |
Oops, something went wrong.