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

283
Views
Firebase HTTP cloud function .send() what does it return?

I'm trying get a value from a firebase cloud function with my Android App.

The cloud function is the following:

 exports.checkIfNumberExists = functions.https.onRequest((request, response) => {
    var db = admin.database();
    var ref = db.ref("numbers");
    var query = ref.orderByKey();
    var exists = "false";
    query.once("value" ,function(snapshot){
            snapshot.forEach(function(childSnapshot){
                if(childSnapshot.key === request.query.number){
                    exists = "true";
                }
            });
            response.send(exists);
        });
 });

I don't understand what type of data does that .send() function return, I asume it is plain text, but yesterday firefox got it as json when the exist value was boolean and not string.

Opening the url with firefox returns true or false, but when I try to make an http get request from Android or Javascript it denies access to it.

What is the return type of .send() function?

over 4 years ago · Santiago Trujillo
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!