Changeset 413 in tmcsimulator for trunk/webapps/cptms/js/harLayer.js
- Timestamp:
- 05/21/2019 07:53:16 AM (7 years ago)
- File:
-
- 1 edited
-
trunk/webapps/cptms/js/harLayer.js (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/webapps/cptms/js/harLayer.js
r400 r413 117 117 outString = "{\"data\":" + jsonstring + "}"; 118 118 119 var xhttp = new XMLHttpRequest();120 xhttp.open("GET", "../cgi-bin/saveHARmessage.py?msg=" + outString, true);121 xhttp.send();122 // Using POST might be a better idea ... haven't tried this yet123 //var xhr = new XMLHttpRequest();124 // xhr.open("POST", "/cgi-bin/saveMessage.py?", true);125 // xhr.setRequestHeader('Content-Type', 'application/json; charset=UTF-8');119 //var xhttp = new XMLHttpRequest(); 120 //xhttp.open("GET", "../cgi-bin/saveHARmessage.py?msg=" + outString, true); 121 //xhttp.send(); 122 // Using POST to send the data 123 var xhr = new XMLHttpRequest(); 124 xhr.open("POST", "../cgi-bin/saveHARmessage.py", true); 125 xhr.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded; charset=UTF-8'); 126 126 // send the collected data as JSON 127 // xhr.send(JSON.stringify(messageList));127 xhr.send("msg="+outString); 128 128 } 129 129
Note: See TracChangeset
for help on using the changeset viewer.
