MCPcopy Create free account
hub / github.com/Tatamo/atcoder-cli / importAxios

Method importAxios

src/session.ts:76–83  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

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) {

Callers 2

getMethod · 0.80
postMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected