Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Do not systematically create a XMLHttpRequest object.
Once linked, the library would always create a XMLHttpRequest on boot to check for supported features. This would force a runtime dependency on XHR even if the feature is not actually used. A problematic exemple would be running some library unit tests with node, which does not include XHR by default. Loading the library will fail right upon importing it, no matter whether we actually use requests or not. This patch make this feature check lazy so that we only fail if we actually try to perform a request.
- Loading branch information