(param, token = "")
| 255 | } |
| 256 | |
| 257 | async request(param, token = "") { |
| 258 | const method = dxSelectMethod(param); |
| 259 | const options = { |
| 260 | method, |
| 261 | url: this.options.server, |
| 262 | headers: { |
| 263 | Param: method === "POST" ? "" : param, |
| 264 | "If-None-Match": token, |
| 265 | "Content-Type": "application/x-www-form-urlencoded", |
| 266 | }, |
| 267 | timeout: 15000, |
| 268 | validateStatus: () => true, |
| 269 | }; |
| 270 | if (method === "POST") options.data = new URLSearchParams({ Param: param }).toString(); |
| 271 | else options.params = { Param: "" }; |
| 272 | const { data } = await axios.request(options); |
| 273 | return data; |
| 274 | } |
| 275 | |
| 276 | async detect() { |
| 277 | const lid = await this.getLid(); |
no test coverage detected