-
Notifications
You must be signed in to change notification settings - Fork 40
Open
Description
Hey @isaacs. Trying to use package. But I'm not quite sure if I'm using it correctly 😀 . when trying to pass the contents of package-lock.json to opts.body
like this...
const json = await npmFetch.json('/-/npm/v1/security/audits', {
method: 'POST',
body: packageLockJsonContents, // this is just the contents of a package-lock.json parsed as an object
});
console.log(JSON.stringify(json, '', 3));
But I get the following error:
Failed to fetch audit report for repo npm. status: 400 cause: {"statusCode":400,"error":"Bad Request","message":"Invalid request payload input"}
How should the opts.body
be formatted? Thanks!
Metadata
Metadata
Assignees
Labels
No labels