Skip to content

Releases: colyseus/colyseus.js

0.16.19

09 Jun 13:10
Compare
Choose a tag to compare
forward custom search params from endpoint. closes #159

0.16.18

30 May 22:40
Compare
Choose a tag to compare
allow to abort client.http requests via AbortController

0.16.17

17 May 14:43
Compare
Choose a tag to compare
bump dist file with latest @colyseus/schema

0.16.16

21 Apr 14:18
Compare
Choose a tag to compare
instance onAuth(): fix forwarding auth.token to server.

0.16.15

27 Mar 13:46
Compare
Choose a tag to compare
do not force latest version of @colyseus/schema on package.json

0.16.14

25 Mar 12:40
Compare
Choose a tag to compare
upgrade rollup packages. fix bad embed of 'ws' module on dist file.

0.16.13

25 Mar 12:06
Compare
Choose a tag to compare
force CI to install latest version of @colyseus/schema so dist colyse…

0.16.12

24 Mar 19:02
Compare
Choose a tag to compare

Allow to customize request headers of client.http requests and WebSocket requests (using Node.js or Bun client)

You can now do the following:

const client = new Client("http://localhost:2567", {
  // optional headers
  headers: {
    ['User-Agent']: "My User Agent"
  },

  // optional urlBuilder
  urlBuilder: (url: URL) => {
    return url.toString();
  }
});

Alternatively, you may customize client.http.headers instead of using the Client's constructor:

client.http.headers = {/* custom headers */};

All the client.http.* calls are going to use the custom headers set.

Web Browsers do not allow to customize WebSocket request headers. You may need to use the urlBuilder option to include additional query params into the WebSocket requests instead of using headers. Node.js and other runtimes allow it, though.

0.16.11

17 Mar 23:15
Compare
Choose a tag to compare
bump version. #155

0.16.10

08 Mar 22:10
Compare
Choose a tag to compare
getStateCallbacks: return 'undefined' if Room is not using SchemaSeri…