Skip to content

options.fetch function is called with no arguments #32

@bman654

Description

@bman654

If you supply a fetch function via the options argument, it gets called with no arguments when fetchPlus calls computeObject(options).

Example:

function myFetch(...args) {
  if (args.length === 0) { console.log(" :( "); }
  return fetch(...args);
}

const client = createClient("http://localhost", { fetch: myFetch });
client.get("/foo"); // calls myFetch(), then calls myFetch("http://localhost/foo")

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions