Hi!
I am writing my own simple embedded web-chat client on Vue.JS around RocketChat server.
I am utilizing websocket API and all is perfect with WS.
Now I want to provide my user with a full list of channels. So that my user could search for a channel and finally join it. Here I have got some questions:
-
is REST API the only option for getting all the chat’s channels?
-
could you provide some examples on how to: 2.1) query the “third page” of 50 channels 2.2) query the channels which names start with “Cha” …
-
when I write my code (Vue.JS) I am facing a CORS problem while accessing the chat. My authorized GET queries are always accompanied by OPTION queries (it’s up to browser so I can not manage it), therefore, they fail. I ended up “proxying” my Vue.JS REST API queries to my dummy server, that does nothing but requests the provided addresses with the data provided.
So, the question is: could you allow OPTION queries on the chat’s server side (while CORS is enabled, of course) so as to make developing around your REST API a less painful process?
Sorry for me probably being out of the topic…