update post body recorder

This commit is contained in:
加里
2014-09-02 14:54:45 +08:00
parent e92bfe2ae8
commit 8ad15162fa
17 changed files with 163 additions and 266 deletions

View File

@@ -58,6 +58,13 @@
</div>
</section>
<section class="reqBody">
<h4 class="subTitle">request body</h4>
<div class="detail">
<p><%= reqBody %></p>
</div>
</section>
<% if(statusCode) { %>
<section class="resHeader">
<h4 class="subTitle">response header</h4>

View File

@@ -154,10 +154,12 @@ seajs.use(['$','Underscore' ,'Backbone'], function($, _, Backbone) {
}
//data via web socket
var dataSocket = new WebSocket("ws://127.0.0.1:8003");
dataSocket.onopen = function(){
console.log("dataSocket open");
if(!WebSocket){
alert("WebSocket is required. Please use a modern browser.");
return;
}
var dataSocket = new WebSocket("ws://127.0.0.1:8003");
dataSocket.onopen = function(){}
dataSocket.onmessage = function(event){
var data = JSON.parse(event.data);