V
V
Vladimir Krauz2016-09-03 01:54:38
JavaScript
Vladimir Krauz, 2016-09-03 01:54:38

NodeJS How to permanently terminate connection with http client?

Good evening.
How to terminate the connection with the client once and for all? So that the next time he connects, he has a new socket and a new connection in general.
Tried res.end(), req.resume(), req.pause() as soon as I didn't.
The problem is that an object is attached to each req during the execution of the POST request, and, with each connection, it must be re-initialized, that is, re-initialized. At the moment, if you make several POST requests from one tab, then this object will not be new, but remains old. How to be?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Andrey Burov, 2016-09-03
@MelancholicTheDie

Send it a "Connection: close" header

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question