feat: Add support for timeout to m.request (#1966)

This commit is contained in:
Stephan Hoyer 2017-11-14 23:47:02 +01:00 committed by Pat Cavit
parent a382c85eb0
commit d50d53f31d
4 changed files with 18 additions and 0 deletions

View file

@ -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])
}