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

356
Views
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 answers
Answer question

0

Change content type to pdf

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