16 lines
417 B
TypeScript
16 lines
417 B
TypeScript
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);
|
|
});
|
|
}
|
|
} |