mirror of
https://codeberg.org/keyoxide/doipjs.git
synced 2024-12-22 22:49:28 -07:00
Add User-Agent to HTTP requests
This commit is contained in:
parent
4f19bd9a38
commit
8b1b741124
1 changed files with 4 additions and 1 deletions
|
@ -71,7 +71,10 @@ const directRequestHandler = async (spData, opts) => {
|
||||||
|
|
||||||
switch (spData.proof.format) {
|
switch (spData.proof.format) {
|
||||||
case 'json':
|
case 'json':
|
||||||
res = await req(url, null, { Accept: 'application/json' })
|
res = await req(url, null, {
|
||||||
|
Accept: 'application/json',
|
||||||
|
'User-Agent': `doipjs/${require('../package.json').version}`,
|
||||||
|
})
|
||||||
return await res.json()
|
return await res.json()
|
||||||
break
|
break
|
||||||
case 'text':
|
case 'text':
|
||||||
|
|
Loading…
Reference in a new issue