Skip to content
This repository was archived by the owner on Jul 30, 2018. It is now read-only.
This repository was archived by the owner on Jul 30, 2018. It is now read-only.

Simplify core/request #253

@rorticus

Description

@rorticus

Currently the request method will dynamically load the default provider, depending on if you are running in node or the browser. This adds some complexity to the code and probably isn’t even needed.

We’re looking for a usage like this,

import request from 'dojo-core/request';
// import node support manually if we want to use it
import nodeProvider from 'dojo-core/request/node';

// set the default provider some how
request.setDefaultProvider(nodeProvider);

// the next request will go to node
request.get(...);
  • Remove the dynamic loading from ProviderRegistry and just assume that defaultValue is already a provider, not a string.
  • Add a method to set the default provider, so it can be injected.
  • Create a convenience method to inject request/node as the default provider for people running in Node.

You can see a rough implementation (as well as some unrelated changes...) here,

master...rorticus:no-streams

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions