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

361
Vistas
How to display or download the contains of a pdf file using webservice?

first of all i am quite knew at webservices and javascript.

I am trying to call a web service that returns a pdf file in this format :

enter image description here

In order to call the pdf i am using res.body just like the code below :

    var url="https://........../......./..../..";
    var options = {
  "rejectUnauthorized": false,
  "method": "GET",
  "url": url,
 "headers": {
    "Authorization": "Basic EJFHUygdiAISDGIF",
    "Content-Type": "application/json"
  }
 
};



request(options, (err, res) => {

  if (res.statusCode == 200 )  {
   
    conversation.logger().info("pdf:" + res.body); // in order to check the content of the pdf in the platform i use
  }
});

My problem here is that i dont know how to download or display the pdf content .

Any help would be valuable.

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

0

Change content type to pdf

"headers": {
    "Authorization": "Basic EJFHUygdiAISDGIF",
    "Content-Type": "application/pdf"
  }
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