Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: Fix
req.end(cb)
; prevent TypeError in Node 12 (#1547)
According to the docs, `req.end` can accept callback as a first argument. That's what `got` module does. Closes #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. ```
- Loading branch information