Commit 35be2011 authored by CompileNix's avatar CompileNix

Add headers to WebSocket Client

parent 216e00d9
......@@ -123,7 +123,8 @@ class Server {
Date: new Date(),
Method: htmlencode(request.method),
RequestUrl: htmlencode(request.url),
Data: htmlencode(data)
Data: htmlencode(data),
Headers: JSON.stringify(request.headers, /* replacer */ null, 2)
}
let stuffString = JSON.stringify(stuff)
......
......@@ -39,6 +39,7 @@
row$.append($('<td/>').html($('<pre/>').html(data.Method)));
row$.append($('<td/>').html($('<pre/>').html(data.RequestUrl)));
row$.append($('<td/>').html($('<pre/>').html(data.Data)));
row$.append($('<td/>').html($('<pre/>').html(data.Headers)));
$("#dataTable").append(row$);
}
......@@ -52,6 +53,7 @@
<th>Method</th>
<th>RequestUrl</th>
<th>Data</th>
<th>Headers</th>
</table>
</body>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment