Interface ClientOption

http client option

interface ClientOption {
    baseUrl?: string;
    caCert?: string;
    childTenantId?: string;
    disableRedirect?: boolean;
    enableCookie?: boolean;
    encoding?: string;
    innerJWTType?: InnerJWTType;
    notCanonicalMIMEHeaderKey?: boolean;
    notEscapeHTML?: boolean;
    proxy?: string;
}

Properties

baseUrl?: string

baseUrl

caCert?: string

the ssl certificate

childTenantId?: string

Deprecated

已废弃参数, 请使用 newChildClient

可选,子租户ID, 如果 innerJWTType 为 ParentToChild 时必填

disableRedirect?: boolean

是否禁用重定向

enableCookie?: boolean

eanble cookie

encoding?: string

default encoding, default as utf-8

innerJWTType?: InnerJWTType

Deprecated

已废弃参数, 请使用 newChildClientnewParentClient

可选,内部 JWT 认证类型

notCanonicalMIMEHeaderKey?: boolean

Remark

if notCanonicalMIMEHeaderKey is fasle, canonical the MIME header key s. The canonicalization converts the first letter and any letter following a hyphen to upper case; the rest are converted to lowercase. For example, the canonical key for "accept-encoding" is "Accept-Encoding". MIME header keys are assumed to be ASCII only. If s contains a space or invalid header field bytes, it is returned without modifications.

Since

AppCube 1.3.8

notEscapeHTML?: boolean

Remark

是否禁用 json 格式请求体 对HTML字符进行转义, 如 & < > 等字符。 默认值为 false, 即默认进行转义。 如请求体 {"A":"1&2"} 经过转义后发送, 服务端实际接收到的请求为 {"A":"1\u00262"}

Since

AppCube 23.5

proxy?: string

the http proxy url, for example: openproxy.huawei.com