mirror of
https://github.com/tenrok/axios.git
synced 2026-06-08 17:22:34 +03:00
Fix/remove url required (#4426)
* Removed error when url is null as this breaks current use cases for alot of projects * Removed associated tests that check for the for url to not be empty
This commit is contained in:
@@ -36,10 +36,6 @@ Axios.prototype.request = function request(configOrUrl, config) {
|
||||
config = configOrUrl || {};
|
||||
}
|
||||
|
||||
if (!config.url) {
|
||||
throw new Error('Provided config url is not valid');
|
||||
}
|
||||
|
||||
config = mergeConfig(this.defaults, config);
|
||||
|
||||
// Set config.method
|
||||
@@ -122,9 +118,6 @@ Axios.prototype.request = function request(configOrUrl, config) {
|
||||
};
|
||||
|
||||
Axios.prototype.getUri = function getUri(config) {
|
||||
if (!config.url) {
|
||||
throw new Error('Provided config url is not valid');
|
||||
}
|
||||
config = mergeConfig(this.defaults, config);
|
||||
return buildURL(config.url, config.params, config.paramsSerializer).replace(/^\?/, '');
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user