fix description

Signed-off-by: liyufan <liyufan5@huawei.com>
This commit is contained in:
liyufan 2023-02-09 09:22:36 +08:00
parent b290e55bb5
commit b846483fac
2 changed files with 22 additions and 0 deletions

View File

@ -174,6 +174,14 @@ declare namespace connection {
* @since 10
*/
function getGlobalHttpProxy(callback: AsyncCallback<HttpProxy>): void;
/**
* Obtains the network independent global {@link HttpProxy} proxy settings.
*
* @returns { Promise<HttpProxy> } the promise returned by the function.
* @systemapi Hide this for inner system use.
* @since 10
*/
function getGlobalHttpProxy(): Promise<HttpProxy>;
/**
@ -187,6 +195,17 @@ declare namespace connection {
* @since 10
*/
function setGlobalHttpProxy(httpProxy: HttpProxy, callback: AsyncCallback<void>): void;
/**
* Set a network independent global {@link HttpProxy} proxy settings.
*
* @param httpProxy Indicates the global proxy settings. For details, see {@link HttpProxy}.
* @permission ohos.permission.CONNECTIVITY_INTERNAL
* @throws {BusinessError} 401 - Parameter error.
* @throws {BusinessError} 201 - Permission denied.
* @systemapi Hide this for inner system use.
* @since 10
*/
function setGlobalHttpProxy(httpProxy: HttpProxy): Promise<void>;
export interface NetConnection {

View File

@ -23,6 +23,9 @@ import connection from "./@ohos.net.connection";
* @syscap SystemCapability.Communication.NetStack
*/
declare namespace http {
/**
* @since 10
*/
type HttpProxy = connection.HttpProxy;
/**