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

170
Vistas
Respond a JSON object in Node.JS using Azure Function

I'm currently learning Azure Functions in my Back-end development. The problem is that using Azure Functions prevents my JavaScript code to return a simple JSON object in Postman. I've read the documentation and also tried using some JS functions like JSON.Stringify, but still no luck. Here's the sample of my code:

message = {
   success: true,
   status: 'pending',
   message: "Some message etc..."
}
return message;

I'm practically new to Azure, so any help will be appreciated. Thanks!

about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

Try this ...

// Construct response
const responseJSON = {
    "name": "Some name",
    "sport": "Some sport",
    "message": "Some message",
    "success": true
}

context.res = {
    // status: 200, /* Defaults to 200 */
    body: responseJSON,
    contentType: 'application/json'
};
about 4 years ago · Juan Pablo Isaza Denunciar
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