Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion _research/ws_client/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@

$("#send").click(function() {
sock.send(JSON.stringify({
type: "request",
id: "random id",
method: $("#method").val(),
path: $("#path").val(),
Expand All @@ -32,7 +33,7 @@
});

sock.onmessage = function(e) {
console.log(JSON.parse(e.data));
console.log(e.data);
};
});
</script>
Expand Down
10 changes: 5 additions & 5 deletions setup/setup.go
Original file line number Diff line number Diff line change
Expand Up @@ -612,11 +612,11 @@ func PrepareMux(flags *env.Flags) *web.Mux {

// Return the final response
result, _ := json.Marshal(map[string]interface{}{
"type": "response",
"id": input.ID,
"status": w.Code,
"header": w.HeaderMap,
"body": w.Body.String(),
"type": "response",
"id": input.ID,
"status": w.Code,
"headers": w.HeaderMap,
"body": w.Body.String(),
})
err = session.Send(string(result))
if err != nil {
Expand Down