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 8561299
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T16:28:20+00:00 2026-06-11T16:28:20+00:00

longtime listener, first time caller. I need to use Node as a client to

  • 0

longtime listener, first time caller.

I need to use Node as a client to connect to a realtime data stream that uses long polling and do stuff with each item as the data is received.

I’ve found plenty of info on using Node as a long polling server, but not as the client.

I know how to use the “Request” module to load a URL, but my problem is the only callback I know of is the “oncomplete” callback, which only fires after the connection is closed. It doesn’t allow me to access the data being received in real time while the connection is held open. I only get to use it when the connection terminates.

Is there a way for Node to open an HTTP connection to a remote server, then fire events whenever data is received?

Or I suppose another question is… is there a way to access whatever buffer all that data is going into while the HTTP connection is in progress?

Thanks!!!

  • 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-11T16:28:21+00:00Added an answer on June 11, 2026 at 4:28 pm

    Don’t use the request module. If you use what’s built into node, it is quite simple.

    http://nodejs.org/api/http.html#http_event_data

    response.on('data', function (chunk) {
        // chunk is the data just received
    })
    

    The request module itself does have a similar method, but I don’t know what it is off the top of my head.

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

Sidebar

Related Questions

long-time listener, first-time caller! I’m trying to connect to MySQL using the ADO.NET Entity
Longtime listener, first time caller :-) I'm new to nodejs and to javascript and
long time listener, first time caller. I have a matrix of icons that can
Long time listener, first time caller. I'm a 6 month old dev from Code
Long time listener, first time caller here. Ok, I apologize for the length of
long time listener first time caller... I have this function (I don;t recall where
I’m a long time listener, but first time caller here… Hoping you can help
I am a long time listener first time caller. I am working on a
long time listener, first time caller... I am creating a splash screen derived from
As they say on the radio - long time listener first time caller.... Here's

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.