更新时间:2023-11-30 10:40:22
如果您不熟悉rxjs,也许可以尝试以下方法?
If you are not familiar with rxjs, perhaps you can try the following?
let requests = listURL.map(url => new HttpRequest('PUT', url, formData, { reportProgress: true});
function do_seq(i) {
httpClient.request(requests[i]).subscribe(event => {
if (i < requests.length - 1) do_seq(i + 1);
});
}
do_seq(0);