add useragent header to commands contacting APIs

This commit is contained in:
Emily 2021-02-26 13:16:47 +11:00
parent aa2d1a99f6
commit 460fccd543
9 changed files with 29 additions and 8 deletions

View file

@ -30,7 +30,8 @@ module.exports = class {
fetch('https://graphqlpokemon.favware.tech/', {
method: 'POST',
headers: {
'Content-Type': 'application/json'
'Content-Type': 'application/json',
'User-Agent': client.config.userAgent
},
body: JSON.stringify({ query: `
{

View file

@ -32,7 +32,8 @@ module.exports = class {
const res = await fetch('https://graphqlpokemon.favware.tech/', {
method: 'POST',
headers: {
'Content-Type': 'application/json'
'Content-Type': 'application/json',
'User-Agent': client.config.userAgent
},
body: JSON.stringify({ query: `
{

View file

@ -30,7 +30,8 @@ module.exports = class {
fetch('https://graphqlpokemon.favware.tech/', {
method: 'POST',
headers: {
'Content-Type': 'application/json'
'Content-Type': 'application/json',
'User-Agent': client.config.userAgent
},
body: JSON.stringify({ query: `
{

View file

@ -31,7 +31,8 @@ module.exports = class {
fetch('https://graphqlpokemon.favware.tech/', {
method: 'POST',
headers: {
'Content-Type': 'application/json'
'Content-Type': 'application/json',
'User-Agent': client.config.userAgent
},
body: JSON.stringify({ query: `
{

View file

@ -31,7 +31,8 @@ module.exports = class {
fetch('https://graphqlpokemon.favware.tech/', {
method: 'POST',
headers: {
'Content-Type': 'application/json'
'Content-Type': 'application/json',
'User-Agent': client.config.userAgent
},
body: JSON.stringify({ query: `
{