Socket
Socket
Sign inDemoInstall

bent

Package Overview
Dependencies
3
Maintainers
1
Versions
66
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 7.3.7 to 7.3.8

2

package.json
{
"name": "bent",
"version": "7.3.7",
"version": "7.3.8",
"description": "Functional HTTP client for Node.js w/ async/await.",

@@ -5,0 +5,0 @@ "main": "src/nodejs.js",

@@ -108,34 +108,17 @@ /* globals atob, it */

if (process.browser) {
test('status 201', async () => {
const request = bent('string', 201)
const str = await request(u('/echo.js?statusCode=201&body=ok'))
same(str, 'ok')
test('status 201', async () => {
const request = bent('string', 201)
const str = await request(u('/echo.js?statusCode=201&body=ok'))
same(str, 'ok')
try {
await request(u('/echo.js?body=ok'))
throw new Error('Call should have thrown.')
} catch (e) {
same(e.message, null)
// basic header test
same(e.headers['content-length'], '2')
}
})
} else {
test('status 201', async () => {
const request = bent('string', 201)
const str = await request(u('/echo.js?statusCode=201&body=ok'))
same(str, 'ok')
try {
await request(u('/echo.js?body=ok'))
throw new Error('Call should have thrown.')
} catch (e) {
same(e.message, process.browser ? null : 'OK')
// basic header test
same(e.headers['content-length'], '2')
}
})
try {
await request(u('/echo.js?body=ok'))
throw new Error('Call should have thrown.')
} catch (e) {
same(e.message, 'OK')
// basic header test
same(e.headers['content-length'], '2')
}
})
}
test('PUT stream', async () => {

@@ -142,0 +125,0 @@ const body = Buffer.from(Math.random().toString())

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc