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

111
Views
Post request to the firebase cloud functions gives error 500

I have a POST request to the Cloud Functions on Firebase. When I'm trying to make a request, I get a CORS policy error. Ok, I set mode: 'no-cors' and get Failed to load resource: the server responded with a status of 500 ().

Here is the code

 let myHeaders = new Headers();
 myHeaders.append("Content-Type", "application/json");
 myHeaders.append("Accept", "application/json");

 let raw = JSON.stringify({
    "description": "Test item",
    "email": "testemail@gmail.com"
 });

 let requestOptions = {
    method: 'POST',
    headers: myHeaders,
    body: raw,
    mode: 'no-cors',
    redirect: 'follow',
 };

 fetch("https://someURl.cloudfunctions.net/someRequest", requestOptions)
 .then(response => response.text())
 .then(result => console.log(result))
 .catch(error => console.log('error', error));

The code is copied from Postman

Any ideas?

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

0

As confirmed by jaba, the issue was on server side. Also, same has been documented here.

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!