braidjs
braidjs copied to clipboard
Make Braidify work with binary payloads
@josephg mentioned that he tested his diamond-types on braid.org/test-a-server, and ran into an issue that test-a-server didn't support binary payloads. I don't think I've tested it with binary, and there are probably places where I'm assuming a string.
I've looked into this. The code in braidify-client.js parses subscriptions using string regular expressions and string matches, which will need to be converted to ArrayBuffer operations. Fixing braidify-server should be simpler; we just need to change the code that writes a body or a patch to work for ArrayBuffers instead of assuming strings.