master updates #41

Manually merged
alex_orid merged 177 commits from master into github-master 2021-05-13 21:11:10 +00:00
2 changed files with 20 additions and 7 deletions
Showing only changes of commit b1d622826f - Show all commits

View File

@ -35,7 +35,7 @@ def init():
print("starting up... ",)
def handle_request_get(requestName, requestType):
return flask.make_response("{\"message\":Handled}", 200, {"Content-Type": "application/json"})
return flask.make_response("{\"message\": \"%s\"}" % "message123123", 200, {"Content-Type": "application/json"})
def handle_request_set(requestName, requestType, requestData):
pass

View File

@ -22,14 +22,25 @@ fetch_GetList = (fetchURL) => response = fetch(fetchURL)
return response.text();
})
myObj = {
'request_name': "Chyron",
'request_type': "list"
};
params = "?request_name="+encodeURIComponent(myObj.request_name)+"&"+"request_type="+encodeURIComponent(myObj.request_type);
url = "http://127.0.0.1:5500/api/v1/user_client/get"+params;
GetList = async (listType) => {
if (listType == "Chyron") {
encodedString = encodeURIComponent({
chyronListRequestOBJ = {
'request_name': "Chyron",
'request_type': "list"
})
targetURL = 'http://127.0.0.1:5500/api/v1/user_client/get?' + encodedString
var a = await fetch_GetList(targetURL);
}
params = "?request_name="+encodeURIComponent(chyronListRequestOBJ.request_name)+"&"+"request_type="+encodeURIComponent(chyronListRequestOBJ.request_type);
targetURL = "http://127.0.0.1:5500/api/v1/user_client/get"+params;
console.log(targetURL)
a = await fetch_GetList(targetURL);
console.log(a);
return a
}
@ -39,8 +50,10 @@ GetList = async (listType) => {
}
async function GetListChyron() {
var returnedList = await GetList("Chyron");
returnedList = await GetList("Chyron");
obj = JSON.parse(returnedList);
console.log(obj["message"])
return returnedList
}
GetListChyron();