cockpit/examples/xhr-proxy/xhrproxy.html

36 lines
1.2 KiB
HTML

<!DOCTYPE html>
<html>
<head>
<title>XMLHttpRequest proxy</title>
<meta charset="utf-8">
<link href="../base1/cockpit.css" type="text/css" rel="stylesheet">
<script src="../base1/cockpit.js"></script>
</head>
<body>
<div class="pf-c-page">
<main class="pf-c-page__main" tabindex="-1">
<section class="pf-c-page__main-section pf-m-light">
<table class="form-table-ct">
<tr>
<th><label class="control-label" for="address">URL</label></th>
<td><input class="form-control" id="address" value="http://localhost:12345"></td>
</tr>
<tr>
<th></th>
<td><button class="pf-c-button pf-m-primary" id="get">GET request</button></td>
<tr>
<th>Code</th>
<td><span id="result"></span></td>
</tr>
<tr>
<th>Output</th>
<td><pre id="output"></pre></td>
</table>
</section>
</main>
</div>
<script src="xhrproxy.js"></script>
</body>
</html>