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.

Fetch option appears to be ignored

See original GitHub issue

As a sanity test, I tried to simply console.log the arguments passed to fetch:

import {Dropbox} from 'dropbox';

const modifiedFetch = (url, init) => {
  console.log("FETCH", url, init);
  return fetch(url, init);
};

const dbx = new Dropbox({
  accessToken: <token here>,
  fetch: modifiedFetch
});

I notice that the console log is never printed.

Looking at dropbox-base.js, the supplied alternative fetch() function should be used, but it seems it isn’t.

https://github.com/dropbox/dropbox-sdk-js/blob/master/src/dropbox-base.js#L128

Issue Analytics

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

github_iconTop GitHub Comments

1reaction
greg-dbcommented, Oct 1, 2018

Apologies for the confusion! I’ll ask the team to work on a new release.

0reactions
greg-dbcommented, Oct 9, 2018

For anyone else following along, this has been released with v4.0.10.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Why is an OPTIONS request sent and can I disable it?
Currently, I get the server to ignore any OPTIONS requests. Now my question is what's good to send an OPTIONS request to double...
Read more >
fetch() - Web APIs | MDN
The global fetch() method starts the process of fetching a resource from the ... and ignore any credentials sent back in the response...
Read more >
Fetch API - The Modern JavaScript Tutorial
Here's the full list of all possible fetch options with their ... The cache options allows to ignore HTTP-cache or fine-tune its usage:....
Read more >
Access-Control-Max-Age is never honoured #342 - GitHub
I have a fetch with CORS, with some custom HTTP headers. Due to that, preflight OPTION fetch is required before the actual fetch....
Read more >
fetch-options Documentation - Git
Providing an empty <refspec> to the --refmap option causes Git to ignore the configured refspecs and rely entirely on the refspecs supplied as...
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