mirror of
https://github.com/therootcompany/request.js
synced 2025-02-20 13:08:04 +00:00
fix(browser): allow single string url as only argument
This commit is contained in:
parent
420eb4f197
commit
a98d4b7341
@ -33,6 +33,9 @@ let _optionKeys = Object.keys(_fetchDefaults).concat([
|
||||
|
||||
function setDefaults(_defs) {
|
||||
return async function request(opts) {
|
||||
if ('string' === typeof opts) {
|
||||
opts = { url: opts };
|
||||
}
|
||||
let reqOpts = { headers: {} };
|
||||
|
||||
if (
|
||||
|
Loading…
x
Reference in New Issue
Block a user