(command: string, data: any)
| 69 | } |
| 70 | |
| 71 | async _post(command: string, data: any) { |
| 72 | const options = { |
| 73 | json: data, |
| 74 | headers: { |
| 75 | "Content-Type": "application/json", |
| 76 | }, |
| 77 | }; |
| 78 | |
| 79 | const httpClient = await this.getHttpClient(); |
| 80 | return httpClient |
| 81 | .post(command, options) |
| 82 | .json() |
| 83 | .then(this._parseResponse) |
| 84 | .catch(this._parseError); |
| 85 | } |
| 86 | |
| 87 | async health(): Promise<string> { |
| 88 | return await this._get("health", {}); |
no test coverage detected