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

198
Views
use fetch function will go wrong in my chrome extension ,it will not send cookies

I want to call fetch function to get some data from the server in my background.js。 like this:

    fetch("https://api.bilibili.com/x/space/acc/info?mid=402655790&jsonp=jsonp")
    .then(response=>{
        console.log(response)
    })

but the console print error description photo

I found some method to solve this problem。 use mode:"no-cors"

Finally, I successfully sent a request,but there was no response.

request success,status code ==200 photo

no data response photo

Besides, I found there is no cookie’s in my request header

no cookies in request header photo

How can I send a request successfully,and get the correct data from the server?

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

0

I found that there was an answer similar to my question, CORS Chrome Extension with manifest version 2。 this problem is caused by CORS。 it can be solved by adding permissions to the manifest.json like this:

    "permissions": [
      "https://*/"
    ],
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!