• Jobs
  • About Us
  • professionals
    • Home
    • Jobs
    • Courses and challenges
    • Questions
    • Teachers
  • business
    • Home
    • Post vacancy
    • Our process
    • Pricing
    • Assessments
    • Payroll
    • Blog
    • Sales
    • Salary Calculator

0

363
Views
Download file from HTTP response NodeRed

In Node-Red, I'm trying to call an API that provides me with a csv file full of data, I make a http request and get the following return:

{
"_msgid": "60d0351dcf215557",
"payload": "",
"topic": "",
"headers": {
    "content-length": "0",
    "connection": "close",
    "content-type": "text/csv",
    "date": "Fri, 13 May 2022 07:48:51 GMT",
    "server": "Microsoft-IIS/10.0",
    "access-control-expose-headers": "Request-Context",
    "cache-control": "no-cache",
    "expires": "-1",
    "pragma": "no-cache",
    "request-context": "",
    "x-frame-options": "DENY",
    "content-disposition": "attachment; filename=Report_20180520_0000_20180720_2359.csv",
    "x-node-red-request-node": "3a8a1b06"
},
"statusCode": 200,
"responseUrl": "https://somewebsite.net/api/analytics/report/someID/file",
"redirectList": [],
"retry": 0,
"url": "https://somewebsite.net/api/analytics/report/someID/file"

My question is, how do I actually get to download the Report_20180520_0000_20180720_2359.csv? Thanks for helping out.

almost 3 years ago · Juan Pablo Isaza
1 answers
Answer question

0

The files content would be in the msg.payload but looking at that response the file returned by the server was empty.

This can be seen by msg.payload being empty and msg.headers.content-length being 0

almost 3 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 Our process Sales
Legal
Terms and conditions Privacy policy
© 2025 PeakU Inc. All Rights Reserved.

Andres GPT

Recommend me some offers
I have an error