question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Requests with URL object as options are broken

See original GitHub issue

The Node.js HTTP & HTTPS libraries allow to pass a new URL() as options. https://nodejs.org/api/https.html#https_https_request_options_callback

According to History URL was added back in v7.5.0 and v9.3.0 allows to pass clientCertEngine as option.

A URL object has properties like .pathname instead of { path: ... } and Nock does not expect these, only allows for either a string options parameter or an object. When used with new URL() both interceptor matching and disableNetConnect are broken.

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:9 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
gr2mcommented, May 30, 2018
1reaction
jinwoocommented, May 30, 2018

I think this can be closed now?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Max retries exceeded with URL in requests - Stack Overflow
Just use requests features: import requests from requests.adapters import HTTPAdapter from urllib3.util.retry import Retry session = requests.
Read more >
Developer Interface — Requests 2.28.1 documentation
Constructs and sends a Request . Parameters. method – method for the new Request object: GET , OPTIONS , HEAD , POST ,...
Read more >
Python requests: GET Request Explained - Datagy
An HTTP GET request is used to retrieve data from the specified resource, such as a website. When using the Python requests library,...
Read more >
URL objects - The Modern JavaScript Tutorial
The built-in URL class provides a convenient interface for creating and parsing URLs. There are no networking methods that require exactly a ...
Read more >
fetch() - Web APIs | MDN
A string or any other object with a stringifier — including a URL object — that provides the URL of the resource you...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found