Skip to content

Instantly share code, notes, and snippets.

@talhabalaj
Created March 4, 2021 05:38
Show Gist options
  • Save talhabalaj/0cb8544d374dfd5a699d6ab41ef1006b to your computer and use it in GitHub Desktop.
Save talhabalaj/0cb8544d374dfd5a699d6ab41ef1006b to your computer and use it in GitHub Desktop.
async function search_data(model) {
return await (await fetch("https://lms.uet.edu.pk/web/dataset/search_read", {
"headers": {
"accept": "application/json, text/javascript, */*; q=0.01",
"accept-language": "en-US,en;q=0.9",
"cache-control": "no-cache",
"content-type": "application/json",
"pragma": "no-cache",
"sec-fetch-dest": "empty",
"sec-fetch-mode": "cors",
"sec-fetch-site": "same-origin",
"x-requested-with": "XMLHttpRequest"
},
"referrer": "https://lms.uet.edu.pk/web?",
"referrerPolicy": "strict-origin-when-cross-origin",
"body": "{\"jsonrpc\":\"2.0\",\"method\":\"call\",\"params\":{\"model\":\"" + model + "\",\"fields\":[],\"domain\":[],\"context\":{\"lang\":\"en_US\",\"tz\":\"Asia/Karachi\",\"params\":{\"action\":113},\"bin_size\":true},\"offset\":0,\"limit\":80,\"sort\":\"\"},\"id\":135986193}",
"method": "POST",
"mode": "cors",
"credentials": "include"
})).json();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment