Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support req.end with callback only #1547

Merged
merged 1 commit into from
May 9, 2019
Merged

Support req.end with callback only #1547

merged 1 commit into from
May 9, 2019

Commits on May 9, 2019

  1. Support req.end with callback only

    According to docs, `req.end` can accept callback as a first argument. That's what `got` module does.
    
    Fixes nock#1509
    
    ```
    request.end([data[, encoding]][, callback])#
    
    History
    data <string> | <Buffer>
    encoding <string>
    callback <Function>
    Returns: <this>
    Finishes sending the request. If any parts of the body are unsent, it will flush them to the stream. If the request is chunked, this will send the terminating '0\r\n\r\n'.
    
    If data is specified, it is equivalent to calling request.write(data, encoding) followed by request.end(callback).
    
    If callback is specified, it will be called when the request stream is finished.
    ```
    gugu committed May 9, 2019
    Configuration menu
    Copy the full SHA
    5498ed4 View commit details
    Browse the repository at this point in the history