Fix body request

This commit is contained in:
Yarmo Mackenbach 2020-11-05 12:57:22 +01:00
parent 05d6986349
commit 98d7e680ef

View file

@ -65,7 +65,7 @@ const match = (uri, opts) => {
} }
const directRequestHandler = async (spData) => { const directRequestHandler = async (spData) => {
const res = await req(spData.proof.fetch ? spData.proof.fetch : spData.proof.uri, 'json', { Accept: 'application/json' }) const res = await req(spData.proof.fetch ? spData.proof.fetch : spData.proof.uri, null, { Accept: 'application/json' })
switch (spData.proof.format) { switch (spData.proof.format) {
case 'json': case 'json':
@ -82,7 +82,7 @@ const directRequestHandler = async (spData) => {
const proxyRequestHandler = async (spData) => { const proxyRequestHandler = async (spData) => {
const url = spData.proof.fetch ? spData.proof.fetch : spData.proof.uri const url = spData.proof.fetch ? spData.proof.fetch : spData.proof.uri
const res = await req(utils.generateProxyURL(spData.proof.format, url), 'json', { Accept: 'application/json' }) const res = await req(utils.generateProxyURL(spData.proof.format, url), null, { Accept: 'application/json' })
const json = await res.json() const json = await res.json()
return json.content return json.content
} }