diff options
Diffstat (limited to 'src/headless/helpers.ts')
-rw-r--r-- | src/headless/helpers.ts | 7 |
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, |