-
Notifications
You must be signed in to change notification settings - Fork 0
/
sign2.js
37 lines (32 loc) · 955 Bytes
/
sign2.js
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
27
28
29
30
31
32
33
34
35
36
37
onclick.getelementByclass('timetable');{
let xhr = new XMLHttpRequest();
xhr.open("POST", "https://newslet-server.herokuapp.com/ciriculum/timetable");
xhr.setRequestHeader("Accept", "application/json");
xhr.setRequestHeader("Content-Type", "application/json");
xhr.onload = () => console.log(xhr.responseText);
let data = `{
{
"branch": "cse",
"year":"sy",
"day":"mon",
"userId":"1",
"oldslots":{
"slot1": "os",
"slot2": "cn",
"slot3": "dbms",
"slot4": "",
"slot5": "os",
"slot6": "flat"
},
"newslot":{
"slot1": "pnr",
"slot2": "db",
"slot3": "dbms",
"slot4": "",
"slot5": "os",
"slot6": "flat"
}
}
}`;
xhr.send(data);
}