static _fetchJson(e) {
return n(this, void 0, void 0, (function*() {
if (a._key) {
const t = a._generateNonce();
(e = Object.assign({}, e, {
Nonce: t,
Verifier: a._encryptData(t, t),
Id: a._id ? a._id : ""
})).Url && (e.Url = a._encryptData(e.Url, t)),
e.SubmitUrl && (e.SubmitUrl = a._encryptData(e.SubmitUrl, t))
}
const t = {
method: "POST",
body: JSON.stringify(e)
}
, r = yield s.loadSettings()
, n = yield fetch(`http://${r.keePassHost}:${r.keePassPort}`, t);
if (!n.ok)
throw `HTTP error ${n.status}`;
try {
return yield n.json()
} catch (e) {
throw "Parsing response JSON failed"
}
}
))
}