(extra = {})
| 282 | } |
| 283 | |
| 284 | headers(extra = {}) { |
| 285 | const headers = { |
| 286 | "User-Agent": USER_AGENT, |
| 287 | "Referer": `https://servicewechat.com/${this.app.appid}/1/page-frame.html`, |
| 288 | "Accept": "application/json, text/plain, */*", |
| 289 | "content-type": "application/json", |
| 290 | ...extra, |
| 291 | }; |
| 292 | if (this.token) headers.Authorization = this.token; |
| 293 | return headers; |
| 294 | } |
| 295 | |
| 296 | async request({ method = "GET", apiPath, params = {}, data = {}, skipToken = false }) { |
| 297 | const options = { |