1e41f4b71Sopenharmony_ci# Common Library Subsystem Changelog
2e41f4b71Sopenharmony_ci
3e41f4b71Sopenharmony_ci## cl.commonlibrary.1 URLParams Class Changes
4e41f4b71Sopenharmony_ciThe constructor function of the **URLParams** class in the URL module of the common library subsystem is changed.
5e41f4b71Sopenharmony_ci
6e41f4b71Sopenharmony_ciSpecifically, **constructor(init?: string[][] | Record<string, string> | string | URLSearchParams)** is changed to **constructor(init?: string[][] | Record<string, string> | string | URLParams)**, and the parameter type is changed from **URLSearchParams** to **URLParams**.
7e41f4b71Sopenharmony_ci
8e41f4b71Sopenharmony_ciYou need to adapt your application.
9e41f4b71Sopenharmony_ci
10e41f4b71Sopenharmony_ci**Change Impacts**
11e41f4b71Sopenharmony_ci
12e41f4b71Sopenharmony_ciJS APIs in API version 9 are affected. Your application needs to adapt these APIs so that it can properly implement features in the SDK environment of the new version.
13e41f4b71Sopenharmony_ci
14e41f4b71Sopenharmony_ci**Key API/Component Changes**
15e41f4b71Sopenharmony_ci
16e41f4b71Sopenharmony_ci| Module                   | Class               | Method/Attribute/Enum/Constant                                         | Change Type|
17e41f4b71Sopenharmony_ci| :------------------------ | ------------------- | ------------------------------------------------------------ | -------- |
18e41f4b71Sopenharmony_ci| @ohos.url        | URLParams         | constructor(string[][] \| Record&lt;string, string&gt; \| string \| URLSearchParams) | Deleted |
19e41f4b71Sopenharmony_ci| @ohos.url         | URLParams       | constructor(string[][] \| Record&lt;string, string&gt; \| string \| URLParams)| Changed |
20e41f4b71Sopenharmony_ci
21e41f4b71Sopenharmony_ci**Adaptation Guide**
22e41f4b71Sopenharmony_ci
23e41f4b71Sopenharmony_ciThe following illustrates how to create a **URLParams** object in your application.
24e41f4b71Sopenharmony_ci
25e41f4b71Sopenharmony_ciExample:
26e41f4b71Sopenharmony_ci
27e41f4b71Sopenharmony_ci```ts
28e41f4b71Sopenharmony_ciimport url from '@ohos.url'
29e41f4b71Sopenharmony_citry {
30e41f4b71Sopenharmony_ci    let params1 = new Url.URLParams('?user=abc&query=xyz')
31e41f4b71Sopenharmony_ci    let params2 = new Url.URLParams(params1)
32e41f4b71Sopenharmony_ci    var result= params2.toString()
33e41f4b71Sopenharmony_ci    console.log(result) //"user=abc&query=xyz"
34e41f4b71Sopenharmony_ci} catch (err) {
35e41f4b71Sopenharmony_ci    console.error(`Fail to ceate URLParams.codeis${err.code},message is ${err.message}`);
36e41f4b71Sopenharmony_ci}
37e41f4b71Sopenharmony_ci```
38e41f4b71Sopenharmony_ci## cl.commonlibrary.2 URL Attribute Changes of URLParams Class APIs
39e41f4b71Sopenharmony_ciThe URL attributes of the URL module in the common library subsystem are changed.
40e41f4b71Sopenharmony_ci
41e41f4b71Sopenharmony_ciSpecifically, the **searchParams: URLSearchParams** attribute is deprecated, and the **params: URLParams** attribute is added.
42e41f4b71Sopenharmony_ci
43e41f4b71Sopenharmony_ciYou need to adapt your application.
44e41f4b71Sopenharmony_ci
45e41f4b71Sopenharmony_ci **Change Impacts**
46e41f4b71Sopenharmony_ci
47e41f4b71Sopenharmony_ciJS APIs in API version 9 are affected. Your application needs to adapt these APIs so that it can properly implement features in the SDK environment of the new version.
48e41f4b71Sopenharmony_ci
49e41f4b71Sopenharmony_ci**Key API/Component Changes**
50e41f4b71Sopenharmony_ci
51e41f4b71Sopenharmony_ci| Module                   | Class               | Method/Attribute/Enum/Constant                                         | Change Type|
52e41f4b71Sopenharmony_ci| :------------------------ | ------------------- | ------------------------------------------------------------ | -------- |
53e41f4b71Sopenharmony_ci| @ohos.url        | URL         |  searchParams: URLSearchParams; |Deprecated (in API version 9)<br>   |
54e41f4b71Sopenharmony_ci| @ohos.url        | URL         |  params: URLParams; | Added    |
55e41f4b71Sopenharmony_ci
56e41f4b71Sopenharmony_ci**Adaptation Guide**
57e41f4b71Sopenharmony_ci
58e41f4b71Sopenharmony_ciThe following illustrates how to create a **URLParams** object in your application.
59e41f4b71Sopenharmony_ci
60e41f4b71Sopenharmony_ciExample:
61e41f4b71Sopenharmony_ci
62e41f4b71Sopenharmony_ci```ts
63e41f4b71Sopenharmony_ciimport url from '@ohos.url'
64e41f4b71Sopenharmony_cilet that = new Url.URL('http://username:password@host:8080/directory/file?Hello=china#qwer=da')
65e41f4b71Sopenharmony_cilet params = that.URLParams
66e41f4b71Sopenharmony_civar result = params.toString()
67e41f4b71Sopenharmony_ciconsole.log(result) //%E4%BD%A0%E5%A5%BD=china
68e41f4b71Sopenharmony_ci```
69