108 lines
4.6 KiB
HTML
108 lines
4.6 KiB
HTML
<!DOCTYPE html>
|
|
<html>
|
|
|
|
<head>
|
|
<meta http-equiv="Content-Type" content="text/html;charset=utf-8">
|
|
<script src="jquery-1.11.3.min.js"></script>
|
|
<script src="tester.js"></script>
|
|
<script src="jquery.iecors.js"></script>
|
|
<script>
|
|
$(document).ready(function()
|
|
{
|
|
$(doInit);
|
|
$(doBuild);
|
|
});
|
|
</script>
|
|
<style>
|
|
pre { font-size: 1.2em;
|
|
-moz-tab-size:4;
|
|
}
|
|
td { vertical-align: top;}
|
|
th {border-bottom: 1px solid #666;line-height:20px;}
|
|
input[type=button],input[type=submit], button {font-weight: bold;}
|
|
</style>
|
|
</head>
|
|
<body style='background-color:#CEE3F6; font-family: Helvetica; font-size: 0.8em;'>
|
|
<form method="post" onsubmit="doSubmit();return false;">
|
|
<table>
|
|
<th colspan="2">FACILITOR API2 Tester</th>
|
|
<tr><td><label>Format</label></td>
|
|
<td><input type='radio' id='format' name='format' value='json' checked='1'>json</input>
|
|
<input type='radio' id='format' name='format' value='xml'>xml</input>
|
|
<input type='radio' id='format' name='format' value='html'>html (=formatted json)</input>
|
|
</td>
|
|
</tr>
|
|
<tr><td><label>APIKEY</label></td>
|
|
<td><input id="apikey" type="text" style="width:250px" value="APIPFO">
|
|
</td>
|
|
</tr>
|
|
<tr><td><label>API2</label></td>
|
|
<td><select id="api" style="width:250px">
|
|
</select>
|
|
</td>
|
|
</tr>
|
|
<tr><td><label>Website</label></td>
|
|
<!-- <td><input id="urlbase" type="text" style="width:250px" value="http://uwva.5iwork/Facilitor5iwork"> -->
|
|
<td><input id="urlbase" type="text" style="width:250px" value="http://uwva.facws001/branch20163/">
|
|
</td>
|
|
</tr>
|
|
<tr><td><label>Pretty JSON</label></td>
|
|
<td><input id="pretty" type="checkbox" checked='1'>
|
|
</td>
|
|
</tr>
|
|
<tr><td><label>Logging</label></td>
|
|
<td><input id="log" type="checkbox" checked='1'></td>
|
|
</tr>
|
|
<tr><td></td><td><input type="button" onclick="doBuild();" value="Build URL"></td></tr>
|
|
<tr><td><label>URL</label></td>
|
|
<td><input id="url" type="text" style="width:800px">
|
|
<div id="urltest" style="width:800px;color:#888;"></div>
|
|
</td>
|
|
</tr>
|
|
<tr><td><label>Method</label></td>
|
|
<td><input type='radio' id='method' name='method' value='GET' checked='1'>GET</input>
|
|
<input type='radio' id='method' name='method' value='PUT'>PUT (update)</input>
|
|
<input type='radio' id='method' name='method' value='POST'>POST (insert)</input>
|
|
<input type='radio' id='method' name='method' value='DELETE'>DELETE</input>
|
|
</td>
|
|
</tr>
|
|
<tr><td><label>Request body</label></td>
|
|
<td><textarea id="xml" style="height:200px;width:800px">
|
|
{
|
|
"appointment": {
|
|
"id": 3328303,
|
|
"from": "2014-06-20T06:00:00Z",
|
|
"to": "2014-06-20T18:00:00Z",
|
|
"description": "Een test afspraak",
|
|
"action": {
|
|
"id": 5,
|
|
"name": "Op laten halen (bellen)"
|
|
},
|
|
"visitors": [
|
|
{
|
|
"id": 5287608,
|
|
"name": "Bezoekernaam",
|
|
"company": "Bezoekerbedrijf",
|
|
"badge": null,
|
|
"in": null,
|
|
"out": null
|
|
}
|
|
]
|
|
}
|
|
}
|
|
</textarea>
|
|
</td>
|
|
</tr>
|
|
<tr><td></td><td><input type="submit" onclick="doSubmit();return false;" value="Submit"></td></tr>
|
|
</table>
|
|
</form>
|
|
<table>
|
|
<tr><td>Status:</td><td><span id="Status"></span></td></tr>
|
|
<tr><td>StatusText:</td><td><span id="StatusText"></span></td></tr>
|
|
<tr><td>Duration:</td><td><span id="Duration"></span></td></tr>
|
|
<tr><td>Records:</td><td><span id="Records"></span></td></tr>
|
|
<tr><td>Result:<button onclick='$("#xml").val($("#Result").text().replace("\r\n", "\n"))'>^^^</button></td>
|
|
<td style='border:1px solid #666;font-size:0.8em;background-color:#fafafa;min-width:800px;'><pre id="Result" style="padding:0 8px 0 2px;"></pre></td></tr>
|
|
</table>
|
|
</body>
|
|
</html> |