()
| 74 | |
| 75 | // 必要になった瞬間にaxiosをimportする |
| 76 | static async importAxios(): Promise<import("axios").AxiosInstance> { |
| 77 | if (Session._axios === null) { |
| 78 | const _axios = (await import("axios")).default; |
| 79 | // 常にtext/htmlをAcceptヘッダーに加えて通信する |
| 80 | return Session._axios = _axios.create({headers: {Accept: "text/html"}}); |
| 81 | } |
| 82 | return Session._axios; |
| 83 | } |
| 84 | |
| 85 | async getCookies(): Promise<CookieInterface> { |
| 86 | if (this._currentTransaction !== null) { |