summaryrefslogtreecommitdiff
path: root/src/headless/helpers.ts
diff options
context:
space:
mode:
authorFlorian Dold <florian.dold@gmail.com>2019-12-09 19:59:08 +0100
committerFlorian Dold <florian.dold@gmail.com>2019-12-09 19:59:08 +0100
commit6415564b9259a4a6a2f6ec9cb934eab3d56a1677 (patch)
tree577372a635b5503c1ad81b2af8523a839e790bb7 /src/headless/helpers.ts
parent99bccae9fe1588f711e7606dc3c6d7dd4a25675a (diff)
downloadwallet-core-6415564b9259a4a6a2f6ec9cb934eab3d56a1677.tar.gz
wallet-core-6415564b9259a4a6a2f6ec9cb934eab3d56a1677.tar.bz2
wallet-core-6415564b9259a4a6a2f6ec9cb934eab3d56a1677.zip
tos
Diffstat (limited to 'src/headless/helpers.ts')
-rw-r--r--src/headless/helpers.ts7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/headless/helpers.ts b/src/headless/helpers.ts
index 7a9cd2ca7..791bd6ab5 100644
--- a/src/headless/helpers.ts
+++ b/src/headless/helpers.ts
@@ -28,6 +28,7 @@ import Axios, { AxiosPromise, AxiosResponse } from "axios";
import {
HttpRequestLibrary,
HttpRequestOptions,
+ Headers,
} from "../util/http";
import * as amounts from "../util/amounts";
import { Bank } from "./bank";
@@ -83,8 +84,12 @@ export class NodeHttpLib implements HttpRequestLibrary {
}
return responseJson;
};
+ const headers = new Headers();
+ for (const hn of Object.keys(resp.headers)) {
+ headers.set(hn, resp.headers[hn]);
+ }
return {
- headers: resp.headers,
+ headers,
status: resp.status,
text: async () => resp.data,
json: makeJson,