From 5dfe2412c483c318007d1d425d8fe4eb09e655b8 Mon Sep 17 00:00:00 2001 From: Yarmo Mackenbach Date: Mon, 2 Nov 2020 18:21:56 +0100 Subject: [PATCH] Add header to request --- src/serviceproviders.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/serviceproviders.js b/src/serviceproviders.js index fa66930..e2ed548 100644 --- a/src/serviceproviders.js +++ b/src/serviceproviders.js @@ -56,8 +56,8 @@ const match = (uri, opts) => { } const directRequestHandler = async (spData) => { - const res = await req(spData.proof.fetch ? spData.proof.fetch : spData.proof.uri) - + const res = await req(spData.proof.fetch ? spData.proof.fetch : spData.proof.uri, {}, { Accept: 'application/json' }) + switch (spData.proof.format) { case 'json': return await res.json()