(
method: string,
req: object,
signal?: AbortSignal,
)
| 138 | } |
| 139 | |
| 140 | async requestPost<T>( |
| 141 | method: string, |
| 142 | req: object, |
| 143 | signal?: AbortSignal, |
| 144 | ): Promise<T> { |
| 145 | const res = await this.client.request({ |
| 146 | url: this.getMethodUrl(method), |
| 147 | method: 'POST', |
| 148 | headers: { |
| 149 | 'Content-Type': 'application/json', |
| 150 | ...this.httpOptions.headers, |
| 151 | }, |
| 152 | responseType: 'json', |
| 153 | body: JSON.stringify(req), |
| 154 | signal, |
| 155 | }); |
| 156 | return res.data as T; |
| 157 | } |
| 158 | |
| 159 | async requestGet<T>(method: string, signal?: AbortSignal): Promise<T> { |
| 160 | const res = await this.client.request({ |
nothing calls this directly
no test coverage detected