Implement responseCode()

This commit is contained in:
RMidhunSuresh 2022-02-03 19:37:34 +05:30
parent 89a97537b0
commit b6e1d4a7d5

View file

@ -50,6 +50,13 @@ class Request implements IHomeServerRequest {
response(): Promise<any> { response(): Promise<any> {
return this._responsePromise; return this._responsePromise;
} }
async responseCode(): Promise<number> {
let resolve;
const promise: Promise<number> = new Promise(r => resolve = r);
this.requestResult?.responseCode().then(code => resolve(code));
return promise;
}
} }
class HomeServerApiWrapper { class HomeServerApiWrapper {