An ArrayBuffer will send its bytes without transformation.
An ArrayBufferView (DataView, Uint8Array, etc) will send its bytes without transformation.
A String will be sent with utf-8 encoding.
An Object will be sent as a JSON string with utf-8 encoding.
Possible types of data to send via publish.
An ArrayBuffer will send its bytes without transformation. An ArrayBufferView (DataView, Uint8Array, etc) will send its bytes without transformation. A String will be sent with utf-8 encoding. An Object will be sent as a JSON string with utf-8 encoding.