2
0
mirror of https://github.com/tenrok/axios.git synced 2026-06-17 19:21:29 +03:00

Splitting progress event handlers into upload and download handlers

This commit is contained in:
Dylan Lundy
2016-08-23 14:22:59 +09:30
committed by Nick Uraltsev
parent 59080e68d9
commit 63f41b53aa
4 changed files with 127 additions and 10 deletions
+7 -3
View File
@@ -270,9 +270,13 @@ These are the available config options for making requests. Only the `url` is re
// `xsrfHeaderName` is the name of the http header that carries the xsrf token value
xsrfHeaderName: 'X-XSRF-TOKEN', // default
// `progress` allows handling of progress events for 'POST' and 'PUT uploads'
// as well as 'GET' downloads
progress: function (progressEvent) {
// `onUploadProgress` allows handling of progress events for uploads
onUploadProgress: function (progressEvent) {
// Do whatever you want with the native progress event
},
// `onDownloadProgress` allows handling of progress events for downloads
onDownloadProgress: function (progressEvent) {
// Do whatever you want with the native progress event
},