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.

url cannot be set in defaults anymore in v0.20.0

See original GitHub issue

Describe the bug

The url option cannot be set in defaults anymore

To Reproduce

Runkit with v0.20.0 (failing): https://runkit.com/embed/ljc1r77qoyte Runkit with v0.19.2 (succeeding): https://runkit.com/embed/ky5awf7v4b4x

const axios = require("axios"),
      request = axios.create({ url: 'https://npm.runkit.com/axios' });

await request().then(({ data }) => data);

Expected behavior

The url option should be settable in defaults.

Environment

  • Axios Version [0.20.0]
  • Adapter [HTTP]
  • Node.js Version [12]
  • OS [Ubuntu 20.04]

Additional context/Screenshots

N/A

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:24 (4 by maintainers)

github_iconTop GitHub Comments

3reactions
HerrTammcommented, Oct 7, 2020

Perhaps fix typings then? Because it’s really confusing as we provided url to “create” method and debugging this was a nightmare.

1reaction
groksrccommented, Sep 29, 2020

I don’t understand why this issue was closed. It’s clearly a breaking change. In 0.18 you can pass a baseURL and a url in the config and it correctly appends the two together. When we went to update to 0.20 it is broken. Using the url config option is clearly documented in the README. This should be reopened and fixed.

Read more comments on GitHub >

github_iconTop Results From Across the Web

can't change .url app - Microsoft Community
Go to Settings > Apps > Default Apps. In Web Browsers, select your desired browser to be set as default, if it is...
Read more >
I can't run 'npm run dev' since Laravel updated with Vite
I installed new laravel project, installed Laravel JetStream with SSR and teams support hit the 'npm install command'. Every time I run npm...
Read more >
What's New - xlwings Documentation
Bug Fix macOS: Python modules on OneDrive Personal are now found again in the default setup even if they have been migrated to...
Read more >
Node.js v19.3.0 Documentation
CORS is never checked on the destination server; Cannot load non-network dependencies; Network-based loading is not enabled by default. Loaders.
Read more >
Bug listing with status RESOLVED with resolution UPSTREAM ...
status:RESOLVED resolution:UPSTREAM severity:normal · Bug:33246 - "enlightenment 0.16.6: cannot set nautilus root window settings" status:RESOLVED ...
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