feat: Add support for timeout to m.request (#1966)
This commit is contained in:
parent
a382c85eb0
commit
d50d53f31d
4 changed files with 18 additions and 0 deletions
|
|
@ -75,6 +75,8 @@ module.exports = function($window, Promise) {
|
|||
}
|
||||
if (args.withCredentials) xhr.withCredentials = args.withCredentials
|
||||
|
||||
if (args.timeout) xhr.timeout = args.timeout
|
||||
|
||||
for (var key in args.headers) if ({}.hasOwnProperty.call(args.headers, key)) {
|
||||
xhr.setRequestHeader(key, args.headers[key])
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue