mirror of
https://codeberg.org/keyoxide/doipjs.git
synced 2024-12-22 22:49:28 -07:00
Fix body request
This commit is contained in:
parent
05d6986349
commit
98d7e680ef
1 changed files with 2 additions and 2 deletions
|
@ -65,7 +65,7 @@ const match = (uri, opts) => {
|
|||
}
|
||||
|
||||
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) {
|
||||
case 'json':
|
||||
|
@ -82,7 +82,7 @@ const directRequestHandler = async (spData) => {
|
|||
|
||||
const proxyRequestHandler = async (spData) => {
|
||||
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()
|
||||
return json.content
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue