mirror of
https://github.com/itplr-kosit/validator.git
synced 2026-05-26 01:05:38 +00:00
(chore) daemon documentation and license clarification for docsify
This commit is contained in:
parent
e01976e7ae
commit
3e4aa9f957
5 changed files with 75 additions and 22 deletions
|
|
@ -3,36 +3,48 @@
|
|||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>Validator</title>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
|
||||
<meta name="viewport" content="width=device-width,initial-scale=1">
|
||||
<link rel="stylesheet" href="lib/vue.css">
|
||||
<meta content="IE=edge,chrome=1" http-equiv="X-UA-Compatible">
|
||||
<meta content="width=device-width,initial-scale=1" name="viewport">
|
||||
<link href="lib/vue.css" rel="stylesheet">
|
||||
|
||||
<style>
|
||||
|
||||
#result {
|
||||
border: 1pt solid black;
|
||||
margin-top: 20px
|
||||
}
|
||||
|
||||
#result:empty {
|
||||
display: none;
|
||||
}
|
||||
|
||||
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<script type="text/javascript">
|
||||
|
||||
|
||||
var validate = function () {
|
||||
const input = document.getElementById('file');
|
||||
const output = document.getElementById('result');
|
||||
|
||||
var validate = function(){
|
||||
const input = document.getElementById('file');
|
||||
const data = input.files[0];
|
||||
const output = document.getElementById('result')
|
||||
var headers = new Headers();
|
||||
headers.append('Content-Type', 'application/xml');
|
||||
|
||||
var myHeaders = new Headers();
|
||||
myHeaders.append("Content-Type", "application/xml");
|
||||
var requestOptions = {
|
||||
method: 'POST',
|
||||
headers: headers,
|
||||
body: input.files[0],
|
||||
redirect: 'follow',
|
||||
};
|
||||
|
||||
var requestOptions = {
|
||||
method: 'POST',
|
||||
headers: myHeaders,
|
||||
body: data,
|
||||
redirect: 'follow'
|
||||
};
|
||||
|
||||
fetch("http://localhost:8080", requestOptions)
|
||||
.then(response => response.text())
|
||||
.then(result => output.innerText = result)
|
||||
.catch(error => output.innerText = result);
|
||||
return false;
|
||||
}
|
||||
fetch('/', requestOptions)
|
||||
.then(response => response.text())
|
||||
.then(result => output.innerText = result)
|
||||
.catch(error => output.innerText = result);
|
||||
return false;
|
||||
};
|
||||
|
||||
|
||||
</script>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue