Skip to content

Instantly share code, notes, and snippets.

@andreybpanfilov
Created January 5, 2018 16:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save andreybpanfilov/9646026b21d95b40e1ccf02176543a14 to your computer and use it in GitHub Desktop.
Save andreybpanfilov/9646026b21d95b40e1ccf02176543a14 to your computer and use it in GitHub Desktop.
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Hello, World!</title>
</head>
<body>
<input type='button' value='Test D2' onclick='exec()'>
<script>
function reqListener() {
console.log(this.responseText);
}
function exec() {
var oReq = new XMLHttpRequest();
oReq.addEventListener("load", reqListener);
oReq.open("POST", "http://localhost:13800");
var body = '{"url":"http://localhost:8080/test/echo?filename=1.txt&content=fuck d2","objectid":"0902994780005ca9","targetfolder":"/Users/apanfilov/Documents","operationtype":"view_content","product_name":"d2","event_name":"emc.ctf.downloadoperation"}';
oReq.send(body);
}
</script>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment