MySQL Forums
Forum List  »  Connector/Node.js

Node JS Http response streaming handling
Posted by: veera ravala
Date: September 15, 2022 10:50PM

I am working on the sensortag devices, I need to get the sensor values continuously from the device. Here I am using the Angular JS & node JS. from the Angular JS I am requesting the node JS to response back the sensor values. Because the sensor is running with the help of Node JS. My requesting code is


$http.get('http://node js url/sensortag device id')
.success(function(response) {
console.log('message from node',response);
})
.error(function() {
});


and from the node js, I am using the response.write() but is not useful to me. It will send the data at the time stopping/closing the connection. I need the continuous responses back.

Please help me out. I got stuck here.

Is http steaming helpful ? and how to use that one.

Other wise let me know if any other way to request the node to keep sending the data

Options: ReplyQuote


Subject
Written By
Posted
Node JS Http response streaming handling
September 15, 2022 10:50PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.