Skip to content

Conversation

@riderx
Copy link

@riderx riderx commented Nov 18, 2025

fix #816

}

const httpModule = options.protocol === 'https:' ? https : http
this._request = httpModule.request(options)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for opening this PR!

According to the docs, we can also pass the URL directly to http.request, which then takes care of parsing it. I haven't tested it yet, but then we don't have to concern ourselves with URL parsing at all.

Suggested change
this._request = httpModule.request(this._url, options)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

DeprecationWarning: url.parse()

2 participants