1e41f4b71Sopenharmony_ci# Upload and Download Subsystem Changelog
2e41f4b71Sopenharmony_ci
3e41f4b71Sopenharmony_ci
4e41f4b71Sopenharmony_ci## cl.request.2 request API Change
5e41f4b71Sopenharmony_ci
6e41f4b71Sopenharmony_ciDeleted the beta APIs in API version 9:
7e41f4b71Sopenharmony_ci
8e41f4b71Sopenharmony_ci1. function download(context: BaseContext, config: DownloadConfig, callback: AsyncCallback\<DownloadTask>): void;
9e41f4b71Sopenharmony_ci2. function download(context: BaseContext, config: DownloadConfig): Promise\<DownloadTask>;
10e41f4b71Sopenharmony_ci3. function upload(context: BaseContext, config: UploadConfig, callback: AsyncCallback\<UploadTask>): void;
11e41f4b71Sopenharmony_ci4. function upload(context: BaseContext, config: UploadConfig): Promise\<UploadTask>;
12e41f4b71Sopenharmony_ci
13e41f4b71Sopenharmony_ci**Change Impact**
14e41f4b71Sopenharmony_ci
15e41f4b71Sopenharmony_ciThe application developed based on an earlier version in the stage model needs to be adapted to the new APIs. Otherwise, the original service logic will be affected.
16e41f4b71Sopenharmony_ci
17e41f4b71Sopenharmony_ci**Key API/Component Changes**
18e41f4b71Sopenharmony_ci
19e41f4b71Sopenharmony_ci| Module         | Class          | Method/Attribute/Enum/Constant                                                                                                      | Change Type|
20e41f4b71Sopenharmony_ci|--------------|--------------|-------------------------------------------------------------------------------------------------------------------|------|
21e41f4b71Sopenharmony_ci| ohos.request | request      | function download(context: BaseContext, config: DownloadConfig, callback: AsyncCallback\<DownloadTask>): void;    | Deleted  |
22e41f4b71Sopenharmony_ci| ohos.request | request      | function download(context: BaseContext, config: DownloadConfig): Promise\<DownloadTask>;                          | Deleted  |
23e41f4b71Sopenharmony_ci| ohos.request | request      | function upload(context: BaseContext, config: UploadConfig, callback: AsyncCallback\<UploadTask>): void;          | Deleted  |
24e41f4b71Sopenharmony_ci| ohos.request | request      | function upload(context: BaseContext, config: UploadConfig): Promise\<UploadTask>;                                | Deleted  |
25e41f4b71Sopenharmony_ci
26e41f4b71Sopenharmony_ci**Adaptation Guide**
27e41f4b71Sopenharmony_ci
28e41f4b71Sopenharmony_ciCall the new APIs. The following uses **downloadFile** as an example to show how it is called in the new version:
29e41f4b71Sopenharmony_ci
30e41f4b71Sopenharmony_ci```ts
31e41f4b71Sopenharmony_citry {
32e41f4b71Sopenharmony_ci    request.downloadFile(globalThis.abilityContext, { url: 'https://xxxx/xxxxx.hap',
33e41f4b71Sopenharmony_ci        filePath: 'xxx/xxxxx.hap'}, (err, data) => {
34e41f4b71Sopenharmony_ci        if (err) {
35e41f4b71Sopenharmony_ci            console.error('Failed to request the download. Cause: ' + JSON.stringify(err));
36e41f4b71Sopenharmony_ci            return;
37e41f4b71Sopenharmony_ci        }
38e41f4b71Sopenharmony_ci    });
39e41f4b71Sopenharmony_ci} catch (err) {
40e41f4b71Sopenharmony_ci    console.log("downloadFile callback fail." + "errCode:" + err.code + ",errMessage:" + err.message);
41e41f4b71Sopenharmony_ci}
42e41f4b71Sopenharmony_ci```
43