Registry Mirror
搜索
Skip to content
You signed in with another tab or window.
Reload
to refresh your session.
You signed out in another tab or window.
Reload
to refresh your session.
You switched accounts on another tab or window.
Reload
to refresh your session.
Dismiss alert
{{ message }}
Files
Expand file tree
main
Breadcrumbs
TradingPlatform
/
javascriptFetch.js
Copy path
Blame
More file actions
Blame
More file actions
Latest commit
History
History
History
27 lines (18 loc) · 547 Bytes
main
Breadcrumbs
TradingPlatform
/
javascriptFetch.js
Copy path
Top
File metadata and controls
Code
Blame
27 lines (18 loc) · 547 Bytes
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
var inputText = '[1, "dLark", "4567", "dasasdas@gmail.com"]' //0 means I want to login, 1 means create account
var arr =[];
async function getData(inputText){
return fetch(`http://127.0.0.1:5000/loginData/${inputText}`)
.then((response)=>response.text())
.then((data)=>{return processResults(data)});
}
async function testFunc(){
if (inputText != ""){
arr = await getData(inputText);
console.log(arr);
}
}
function processResults(data){
data = JSON.parse(data)
return data
}
testFunc()
You can’t perform that action at this time.