Skip to content

Cancel non-happy-path stream. #4

Open

Description

@coolaj86
request({ ..., stream: ws }).then(mustOk);

There should be a way for the mustOk function to cancel ws.

Activity

  1. coolaj86 commented on Oct 18, 2021

    @coolaj86
    ContributorAuthor

    Possibly add resp.stream.unpipe()?

                if (opts.stream) {
                    resp.stream = setupPipe(resp, opts);
                    //resp.stream.stream = opts.stream;
                    resp.stream.unpipe = function () {
                        resp.unpipe(opts.stream);
                    };
    
                // ...
    
                }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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