Skip to content
This repository was archived by the owner on May 13, 2024. It is now read-only.

Commit 86710d3

Browse files
Hubert KosterHubert Koster
authored andcommitted
chore: content improvements
1 parent 06df695 commit 86710d3

File tree

2 files changed

+3
-3
lines changed
  • docs
    • core-concepts/authorization-authentication
    • languages/javascript/websocket-connection

2 files changed

+3
-3
lines changed

docs/core-concepts/authorization-authentication/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,4 +145,4 @@ The response for the `authorize` call would be an object as below:
145145
"user_id": 12345678
146146
}
147147
```
148-
Now, the user is authorised, and you use Deriv API calls on behalf of the account.
148+
Now, the user is authorised, and you can use Deriv API calls on behalf of the account.

docs/languages/javascript/websocket-connection/index.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ Now, open the `index.html` file in our browser and check your developer console.
7575
Our WebSocket server provides a [ping/pong](/api-explorer#ping) functionality. Let's use it in our demo project to send and receive data. Change the event listeners for `open` and `message` as below:
7676

7777
:::caution
78-
The `send` function on the WebSocket connection, only receives `string`, `ArrayBuffer`, `Blob`, `TypedArray` and `DataView` data types. You can read more about them on [MDN](https://developer.mozilla.org/en-US/docs/Web/API/WebSocket/send). This means, if we want to send an `object`, we have to stringify it with `JSON.stringify` first.
78+
The `send` function on the WebSocket connection, only receives `string`, `ArrayBuffer`, `Blob`, `TypedArray` and `DataView`. You can read more about them on [MDN](https://developer.mozilla.org/en-US/docs/Web/API/WebSocket/send). This means, if we want to send an `object`, we have to stringify it with `JSON.stringify` first.
7979
:::
8080

8181
```js title="index.js"
@@ -115,7 +115,7 @@ The `ping` request is mostly used to test the connection or to keep it alive.
115115

116116
### Keep WebSocket connection alive
117117

118-
By default, `WebSocket connections` will be closed when no traffic is sent between them for around **180 seconds**. One way to keep the connection alive is by sending a [ping](/api-explorer#ping) request with intervals of **120 seconds**. This way you will keep the connection alive and active.
118+
By default, `WebSocket connections` will be closed when no traffic is sent between them for around **180 seconds**. One way to keep the connection alive is to send [ping](/api-explorer#ping) requests with intervals of **120 seconds**. This will keep the connection alive and active.
119119

120120
A simple setup example would be the following:
121121

0 commit comments

Comments
 (0)