diff --git a/README.md b/README.md index 0137f5d..d9e9a0a 100644 --- a/README.md +++ b/README.md @@ -92,12 +92,13 @@ There are a few additional options that can be used in all above methods: ```javascript const Pusher = require("pusher") +const http = require("http") const pusher = new Pusher({ // you can set other options in any of the 3 ways described above proxy: "HTTP_PROXY_URL", // optional, URL to proxy the requests through timeout: TIMEOUT, // optional, timeout for all requests in milliseconds - keepAlive: KEEP_ALIVE, // optional, enables keep-alive, defaults to false + agent: new http.Agent({ keepAlive: true }), // optional, enables keep-alive }) ``` @@ -170,7 +171,7 @@ pusher.sendToUser("user-1", "test_event", { message: "hello world" }) ### Excluding event recipients -In order to avoid the client that triggered the event from also receiving it, a `socket_id` parameter can be added to the `params` object. For more information see: . +In order to avoid the client that triggered the event from also receiving it, a `socket_id` parameter can be added to the `params` object. For more information see: . ```javascript pusher.trigger(channel, event, data, { socket_id: "1302.1081607" }) @@ -390,7 +391,7 @@ pusher pusher.get({ path: "/channels", params: params }) ``` -Information on the optional `params` and the structure of the returned JSON is defined in the [REST API reference](http://pusher.com/docs/rest_api#method-get-channels). +Information on the optional `params` and the structure of the returned JSON is defined in the [REST API reference](https://pusher.com/docs/channels/library_auth_reference/rest-api/#method-get-channels). #### Get the state of a channel @@ -398,7 +399,7 @@ Information on the optional `params` and the structure of the returned JSON is d pusher.get({ path: "/channels/[channel_name]", params: params }) ``` -Information on the optional `params` option property and the structure of the returned JSON is defined in the [REST API reference](http://pusher.com/docs/rest_api#method-get-channel). +Information on the optional `params` option property and the structure of the returned JSON is defined in the [REST API reference](https://pusher.com/docs/channels/library_auth_reference/rest-api/#method-get-channel). #### Get the list of users in a presence channel @@ -406,7 +407,7 @@ Information on the optional `params` option property and the structure of the re pusher.get({ path: "/channels/[channel_name]/users" }) ``` -The `channel_name` in the path must be a [presence channel](http://pusher.com/docs/presence). The structure of the returned JSON is defined in the [REST API reference](http://pusher.com/docs/rest_api#method-get-users). +The `channel_name` in the path must be a [presence channel](https://pusher.com/docs/channels/using_channels/presence-channels/). The structure of the returned JSON is defined in the [REST API reference](https://pusher.com/docs/channels/library_auth_reference/rest-api/#method-get-users). ### WebHooks