Skip to content

response does not end, res.on('end') event never occurs #650

@ORESoftware

Description

@ORESoftware

I have this POST request.
It looks the response never ends for a HTTP POST to /coverage/client...
Is it my code, or is it perhaps that the response doesn't get ended on the part of the server?

I have this code:

         let options = {
          port: 3050,
          host: cdtHost,
          path: '/coverage/client',
          method: 'POST',
          headers: {
            'Content-Type': 'application/json',
          }
        };
        let req = http.request(options, function (res) {

          res.once('end', function () { 
            console.log('\nFinished sending coverage data.');   /// << res.once('end') never fires
            done();
          });

        });

Maybe it's my misuse, but it looks like

          res.once('end', function () { 
            console.log('\nFinished sending coverage data.');   /// << res.once('end') never fires
            done();
          });

will never fire, not sure why.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions