mirror of
https://github.com/vector-im/hydrogen-web.git
synced 2024-12-23 11:35:04 +01:00
Implement responseCode()
This commit is contained in:
parent
89a97537b0
commit
b6e1d4a7d5
@ -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 {
|
||||||
|
Loading…
Reference in New Issue
Block a user