You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
<li>Incremental data update: replacing polling by push is not enough to minimize data streams. That's why streamdata.io pushes only the part that has changed.</li>
93
-
<li><ahref="http://www.w3.org/TR/eventsource/" target="_blank">ServerSentEvents (SSE)</a>: updates are pushed to the client using SSE protocol. By providing fallback mechanisms streamdata.io can also work with older browsers.</li>
93
+
<li><ahref="http://www.w3.org/TR/eventsource/" target="_blank">Server-Sent-Events (SSE)</a>: updates are pushed to the client using SSE protocol. By providing fallback mechanisms streamdata.io can also work with older browsers.</li>
94
94
<li>API Cache: to reduce server load and latency, streamdata.io has an integrated cache mechanism.</li>
95
95
</ul>
96
96
<p>This Javascript SDK facilitates the usage of streamdata.io.</p>
@@ -101,12 +101,12 @@ <h2 id="1-add-sdk-to-your-application">1. Add SDK to your application</h2>
<p>By doing this, you access in your JavaScript code to the <code>streamdataio</code> object which is the central point of all streamdata.io SDK API.</p>
104
-
<h2id="2-create-a-streamdataeventsource-object">2. Create a StreamDataEventSource Object</h2>
104
+
<h2id="2-use-streamdata-io-to-connect-to-your-api">2. Use streamdata.io to connect to your API</h2>
105
105
<p>Create a <code>StreamDataEventSource</code> object into your JavaScript code.</p>
106
106
<pre><codeclass="lang-javascript"> var myEventSource = streamdataio.createEventSource("http://mysite.com/myJsonRestService");
107
107
</code></pre>
108
108
<p>The <code>StreamDataEventSource</code> is the main entry point for establishing a data stream connection to the given URL. </p>
109
-
<p>It uses standard HTTP ServerSentEvents to get the data you required through streamdata.io proxy.</p>
109
+
<p>It uses standard HTTP Server-Sent-Events to get the data you required through streamdata.io proxy.</p>
110
110
<p>If your API requires specific headers, simply pass them as an array on the event source creation, and streamdata.io will forward them to your Information System.</p>
111
111
<p>An optional <code>headers</code> parameter can be passed to the <code>createEventSource</code> method. </p>
112
112
<p>It must be an array with the following structure:</p>
@@ -121,32 +121,22 @@ <h2 id="2-create-a-streamdataeventsource-object">2. Create a StreamDataEventSour
121
121
122
122
var myEventSource = streamdataio.createEventSource(url, headers);
123
123
</code></pre>
124
-
<h2id="3-add-callbacks-to-handle-data-reception">3. Add callbacks to handle data reception</h2>
124
+
<h2id="3-handle-data-reception">3. Handle data reception</h2>
125
125
<p>streamdata.io SDK handles data from the targeted REST service as JSON objects.</p>
126
126
<p>When the <code>StreamDataEventSource</code> object is opened, the initial set of data is returned as it would be with a standard call to the service URL. This data set is called the <strong>snapshot</strong>. The SDK returns it through the <code>onData</code> callback.</p>
127
127
<p>The updates of this initial set will come subsequently in the <ahref="http://tools.ietf.org/html/rfc6902" target="_blank">JSON-Patch</a> format through the <code>onPatch</code> callback. Such a data update is called a <strong>patch</strong>.</p>
<p>streamdata.io uses Transport Layer Security (TLS) to encrypt messages while in transport across the Internet. Using TLS ensures that client messages are protected when being sent to and from streamdata.io. This prevents intercepted messages from being viewed by unauthorized parties.</p>
222
214
<p>Running an application in production through streamdata.io proxy requires an authentication mechanism.</p>
223
215
<p>When registering on <ahref="http://streamdata.io" target="_blank">streamdata.io web site</a>, you'll be provided with a unique key pair for your application.</p>
224
216
<p>This allows streamdata.io proxy to identify that a specific request comes from your application.</p>
225
217
<p>This key pair must be provided to the SDK in order to be able to use the streamdata.io proxy.</p>
226
-
<h2id="1-provide-key-pair-in-source-code">1. Provide key pair in source code</h2>
218
+
<h2id="2-provide-key-pair-in-source-code">2. Provide key pair in source code</h2>
0 commit comments