Socket
Socket
Sign inDemoInstall

undici

Package Overview
Dependencies
Maintainers
3
Versions
212
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

undici - npm Package Compare versions

Comparing version 5.6.0 to 5.6.1

3

lib/fetch/request.js

@@ -846,4 +846,3 @@ /* globals AbortController */

key: 'method',
converter: webidl.converters.ByteString,
defaultValue: 'GET'
converter: webidl.converters.ByteString
},

@@ -850,0 +849,0 @@ {

@@ -102,3 +102,3 @@ 'use strict'

const { origin, pathname, search } = util.parseURL(new URL(this.location, this.opts.origin))
const { origin, pathname, search } = util.parseURL(new URL(this.location, this.opts.origin && new URL(this.opts.path, this.opts.origin)))
const path = search ? `${pathname}${search}` : pathname

@@ -105,0 +105,0 @@

{
"name": "undici",
"version": "5.6.0",
"version": "5.6.1",
"description": "An HTTP/1.1 client, written from scratch for Node.js",

@@ -96,3 +96,3 @@ "homepage": "https://undici.nodejs.org",

"tap": "^16.1.0",
"tsd": "^0.21.0",
"tsd": "^0.22.0",
"wait-on": "^6.0.0"

@@ -99,0 +99,0 @@ },

@@ -286,2 +286,9 @@ # undici

However, if you want to get only headers, it might be better to use `HEAD` request method. Usage of this method will obviate the need for consumption or cancelling of the response body. See [MDN - HTTP - HTTP request methods - HEAD](https://developer.mozilla.org/en-US/docs/Web/HTTP/Methods/HEAD) for more details.
```js
const headers = await fetch(url, { method: 'HEAD' })
.then(res => res.headers)
```
##### Forbidden and Safelisted Header Names

@@ -288,0 +295,0 @@

Sorry, the diff of this file is too big to display

SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc