Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

284
Vistas
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
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda