Skip to content
This repository was archived by the owner on Aug 11, 2021. It is now read-only.

Commit f4bbf16

Browse files
committed
Document corgi changes
1 parent 0d71d89 commit f4bbf16

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

README.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,19 @@ for authorization. These credentials always look the same:
5353
* `alwaysAuth` {Boolean} Whether calls to the target registry are always
5454
authed.
5555

56+
## Requests
57+
58+
As of `npm-registry-client@8`, all requests are made with an `Accept` header
59+
of `application/vnd.npm.install-v1+json; q=1.0, application/json; q=0.8, */*`.
60+
61+
This enables filtered document responses to requests for package metadata.
62+
You know that you got a filtered response if the mime type is set to
63+
`application/vnd.npm.install-v1+json` and not `application/json`.
64+
65+
This filtering substantially reduces the over all data size. For example
66+
for `https://registry.npmjs.org/npm`, the compressed metadata goes from
67+
410kB to 21kB.
68+
5669
## API
5770

5871
### client.access(uri, params, cb)

0 commit comments

Comments
 (0)