We use cookies
We use cookies and other tracking technologies to improve your browsing experience on our website, to show you personalized content and targeted ads, to analyze our website traffic, and to understand where our visitors are coming from.
const socket = io({
query: {
arr: ['a', 'b']
}
});
WSSocketIO.SocketIO.Parameters := '&arr=[''a'',''b'']';
WSSocketIO.SocketIO.Parameters := '&arr=["a","b"]';
WSSocketIO.SocketIO.Parameters := '&arr=%5B%27a%27,%27b%27%5D';
/**
* the authentication payload sent when connecting to the Namespace
*/
auth?: { [key: string]: any } | ((cb: (data: object) => void) => void);
/**
* Credentials that are sent when accessing a namespace.
*
* @example
* const socket = io({
* auth: {
* token: "abcd"
* }
* });
*
* // or with a function
* const socket = io({
* auth: (cb) => {
* cb({ token: localStorage.token })
* }
* });
*/
public auth: { [key: string]: any } | ((cb: (data: object) => void) => void);
procedure OnHTTPRequest(Sender: TObject; aRequest: TsgcWSSocketIOHTTPRequest);
begin
aRequest.Headers.Add('Authorization: Token your-token');
end;