Adds Server Sent Events debug support

This commit is contained in:
Liyas Thomas
2019-11-25 05:13:35 +05:30
parent 57b71ce4ea
commit 0383403cce
4 changed files with 12 additions and 8 deletions

View File

@@ -91,6 +91,10 @@ _Customized themes are also synced with local session storage_
- Send and receive data
📡 **Server Sent Events**: Receive a stream of updates from a server over a HTTP connection without resorting to polling.
- Receive data
🌍 **GraphQL**: GraphQL is a query language for APIs and a runtime for fulfilling those queries with your existing data.
- Set endpoint and get schemas

View File

@@ -101,9 +101,9 @@
<logo alt style="height: 24px;"></logo>
</nuxt-link>
<nuxt-link
to="/websocket"
:class="linkActive('/websocket')"
v-tooltip.right="'WebSocket'"
to="/realtime"
:class="linkActive('/realtime')"
v-tooltip.right="'Realtime'"
>
<i class="material-icons">settings_input_hdmi</i>
</nuxt-link>
@@ -144,7 +144,7 @@
</ul>
</nav>
</div>
<div v-else-if="['/websocket'].includes($route.path)">
<div v-else-if="['/realtime'].includes($route.path)">
<nav class="secondary-nav">
<ul>
<li>

View File

@@ -43,7 +43,7 @@ export default {
},
{
name: 'keywords',
content: 'postwoman, postwoman chrome, postwoman online, postwoman for mac, postwoman app, postwoman for windows, postwoman google chrome, postwoman chrome app, get postwoman, postwoman web, postwoman android, postwoman app for chrome, postwoman mobile app, postwoman web app, api, request, testing, tool, rest, websocket'
content: 'postwoman, postwoman chrome, postwoman online, postwoman for mac, postwoman app, postwoman for windows, postwoman google chrome, postwoman chrome app, get postwoman, postwoman web, postwoman android, postwoman app for chrome, postwoman mobile app, postwoman web app, api, request, testing, tool, rest, websocket, sse, graphql'
},
{
name: 'X-UA-Compatible',

View File

@@ -194,7 +194,7 @@ export default {
input: ""
},
connectionSSEState: false,
server: "https://wgrothaus.ucc.ie/~frank/cs3513/server_event_source.php",
server: "https://express-eventsource.herokuapp.com/events",
sse: null,
events: {
log: null,
@@ -227,7 +227,7 @@ export default {
"((([a-z\\d]([a-z\\d-]*[a-z\\d])*)\\.)+[a-z]{2,}|" +
"((\\d{1,3}\\.){3}\\d{1,3}))" +
"(\\:\\d+)?(\\/[-a-z\\d%_.~+@]*)*" +
"(\\?[;&a-z\\d%_.~+=-]*)?" +
"(\\?[:\\;&a-z\\d%_.~+=-]*)?" +
"(\\#[-a-z\\d_]*)?$",
"i"
);
@@ -429,7 +429,7 @@ export default {
});
},
stop() {
if (this.sse !== null) this.sse.close();
this.sse.close();
}
},
updated: function() {