Skip to content

Commit

Permalink
doc: axios adapter docs (#2469)
Browse files Browse the repository at this point in the history
Axios stopped exporting the adapters (you will get `Cannot find module 'axios/lib/adapters/http'` errors) but you can now specify the adapter as a string.
  • Loading branch information
jansepke committed Apr 26, 2023
1 parent 7d22513 commit 3a7c7c3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion README.md
Expand Up @@ -1541,7 +1541,7 @@ import test from 'ava' // You can use any test framework.
// References:
// https://github.com/nock/nock/issues/699#issuecomment-272708264
// https://github.com/axios/axios/issues/305
axios.defaults.adapter = require('axios/lib/adapters/http')
axios.defaults.adapter = 'http'

test('can fetch test response', async t => {
// Set up the mock request.
Expand Down

0 comments on commit 3a7c7c3

Please sign in to comment.