From 6415564b9259a4a6a2f6ec9cb934eab3d56a1677 Mon Sep 17 00:00:00 2001 From: Florian Dold Date: Mon, 9 Dec 2019 19:59:08 +0100 Subject: tos --- src/headless/helpers.ts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'src/headless/helpers.ts') 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, -- cgit v1.2.3