Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

57
Views
js - filters in fetch

I have a problem. I'm trying to fetch an API, but theres an error-message which says:
At least one filtering parameter must exist

I found something on google, but nothing of it worked. My code looks like this:

let api = await fetch("https://api.clashofclans.com/v1/clans/#2Q8GRY8LQ", {
  method: `GET`,
  headers: new Headers({
    'Authorization': `Bearer ${API_TOKEN}`,
  })
})
let apiJSON = await api.json()
console.log(apiJSON)

Thanks

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

Try to encodeURIComponent of the clan tag like this:

let api = await fetch(`https://api.clashofclans.com/v1/clans/${encodeURIComponent(#2Q8GRY8LQ)}`, {
    method: `GET`,
    headers: new Headers({
       'Authorization': `Bearer ${API_TOKEN}`,
    })
})
let apiJSON = await api.json()
console.log(apiJSON)
about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!