forked from mystiq/hydrogen-web
Implement responseCode()
This commit is contained in:
parent
89a97537b0
commit
b6e1d4a7d5
1 changed files with 7 additions and 0 deletions
|
@ -50,6 +50,13 @@ class Request implements IHomeServerRequest {
|
|||
response(): Promise<any> {
|
||||
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 {
|
||||
|
|
Loading…
Reference in a new issue