File tree Expand file tree Collapse file tree 2 files changed +10
-0
lines changed
Expand file tree Collapse file tree 2 files changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -27,6 +27,8 @@ export default function execute<T>(request: httpclient.Request): Promise<httpcli
2727 const xhr = new XMLHttpRequest ( )
2828 xhr . withCredentials = request . withCredentials
2929 xhr . timeout = request . timeout
30+ xhr . upload . onloadstart = request . upload . onloadstart
31+ xhr . upload . onprogress = request . upload . onprogress
3032
3133 // This internal method takes the xml request and retrieves headers from it
3234 const parseResponseHeaders = function ( request : XMLHttpRequest ) : httpclient . Headers {
Original file line number Diff line number Diff line change @@ -75,6 +75,10 @@ export namespace httpclient {
7575 }
7676 // Contains every parameter needed for a request as properties
7777 export class Request {
78+ upload : {
79+ onprogress : { ( event : Event ) : void }
80+ onloadstart : { ( event : Event ) : void }
81+ }
7882 url : string
7983 contentType : string = 'application/json; charset=UTF-8'
8084 // A way to declare an enumeration (can be anything because of the string but the IDE will suggest the 4 first verbs)
@@ -117,6 +121,10 @@ export namespace httpclient {
117121 if ( timeout ) {
118122 this . timeout = timeout
119123 }
124+ this . upload = {
125+ onprogress : ( ) => void 0 ,
126+ onloadstart : ( ) => void 0
127+ }
120128 }
121129
122130 // sets the properties (like a constructor for changes)
You can’t perform that action at this time.
0 commit comments