8000 Tags · gaoyuqi/nock · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Tags: gaoyuqi/nock

Tags

v9.4.4

Toggle v9.4.4's commit message
fix(nock#1076): allowUnmocked: true + host regex (nock#1179<
8000
/a>)

v9.4.3

Toggle v9.4.3's commit message
fix(nock#1171): When matching the path by function, also check the HT…

…TP method.

v9.4.2

Toggle v9.4.2's commit message
fix: Replaced util._extend with Object.assign due to deprecated since…

… node v6.

v9.4.1

Toggle v9.4.1's commit message
docs: Add CONTRIBUTE, edit README, update LICENSE year (nock#1155)

v9.4.0

Toggle v9.4.0's commit message
feat: emit 'request' event with body as third parameter (nock#1062)

v9.3.3

Toggle v9.3.3's commit message
fix: match basePath as regex and path as function (nock#1147)

v9.3.2

Toggle v9.3.2's commit message
fix: restore compatibility with Node <4.5 (nock#1144)

This reverts commit e933b3a.

v9.3.1

Toggle v9.3.1's commit message
fix: use `aborted` property on http request (nock#1134)

I had some difficulty with this code:

    httpRequest.on('timeout', function () {
      trackFailure('timeout')
      httpRequest.abort()
    })

    httpRequest.on('error', function (err) {
      // Count error if request wasn't aborted due to timeout
      if (!httpRequest.aborted) {
        trackFailure(err)
      }
      callback(err)
    }

When `nock` was not in use, `trackFailure()` would be called once on
timeout.  With `nock` enabled, `trackFailure()` would be called twice
because `httpRequest.aborted` would be undefined.

This change creates and uses the `aborted` property in the same
fashion as the system `http` module.

v9.3.0

Toggle v9.3.0's commit message
feat: support URL objects

`url.URL` was added in Node 7 and functions like `http.get()`,
`http.request()` accept URL objects as well as strings as their first
argument. Add support for that to nock.

v9.2.6

Toggle v9.2.6's commit message
fix: match HTTP headers with case insensitivity (nock#1122)

0