Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8220169
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T13:25:51+00:00 2026-06-07T13:25:51+00:00

I am using the following node.js code to download documents from some url and

  • 0

I am using the following node.js code to download documents from some url and save it in the disk.
I want to be informed about when the document is downloaded. i have not seen any callback with pipe.Or, Is there any ‘end’ event that can be captured on completion of download ?

request(some_url_doc).pipe(fs.createWriteStream('xyz.doc'));
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-07T13:25:56+00:00Added an answer on June 7, 2026 at 1:25 pm

    Streams are EventEmitters so you can listen to certain events. As you said there is a finish event for request (previously end).

     var stream = request(...).pipe(...);
     stream.on('finish', function () { ... });
    

    For more information about which events are available you can check the stream documentation page.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am using the following code in my solr project: <document> <entity name=node dataSource=opennms
I am using following code to remove some specific nodes from xml file..It show
I'm using the following library https://github.com/Leonidas-from-XIV/node-xml2js To convert XML to JSON. After conversion console.log
I have written the following code using node.js and riak-js . I have a
I'm using the following code... var result = document.evaluate(expr,context,null,9,null); When printing the result I
I am using node-mysql to update a MySQL database table from node.js. I want
Using the following bit of code: function Node(){ .... function foo(request){ for (var name
I am using following code to get List from xml file - public static
How would one code the following using XGrid from JFXtras6? Stage { title: Mig
I am using the following code to remove an element from the DOM tree:

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.