import axios from "axios";

export class WebsocketSession
{
    static get(onSucces: (token: string) => void)
    {
        axios.post<string>(ApiConfig.getHttpBase() + '/websocket-session', undefined, {
            headers: {
                Authorization: StringUtils.format("Bearer %s", requireToken())
            }
        })
        .then((response) => {
            onSucces(response.data);
        });
    }
}