Options
All
  • Public
  • Public/Protected
  • All
Menu

Class ApiRequest

export
since

1.1.6

version

2021-12-09

Hierarchy

  • ApiRequest

Index

Constructors

  • Warning: Remove "Action" field since version 1.1.12

    since

    1.1.12

    version

    2018-10-20

    Parameters

    Returns ApiRequest

Properties

URL: string
Signature: "Signature" = "Signature"
SignatureNonce: "SignatureNonce" = "SignatureNonce"
Timestamp: "Timestamp" = "Timestamp"

Accessors

  • get EncodeURIMethod(): (str: string) => string
  • since

    1.1.12

    version

    2018-10-20

    Returns (str: string) => string

      • (str: string): string
      • 字符AZ、az、09以及字符 -、_、.、 不编码。

        其它字符编码成%XY的格式,其中XY是字符对应ASCII码的16进制。示例:半角双引号(")对应%22。

        扩展的UTF-8字符,编码成%XY%ZA…的格式。

        空格( )编码成 %20,而不是加号(+)。

        该编码方式与application/x-www-form-urlencoded MIME格式编码算法相似,但又有所不同。

        encodeURIComponent: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/encodeURIComponent Not Escaped: A-Z a-z 0-9 - _ . ! ~ * ' ( )

        !*()' %21 %2A %28 %29 %27

        since

        1.1.6

        version

        2021-12-07

        Parameters

        • str: string

        Returns string

  • get FullUrlWithoutSignature(): string
  • since

    1.1.17

    version

    2019-02-20

    Returns string

  • get UrlWithoutSignature(): string
  • since

    1.1.12

    version

    2018-10-20

    Returns string

Methods

  • AddParameter(name: string, val?: string): ApiRequest
  • Parameters

    • name: string
    • Optional val: string

    Returns ApiRequest

  • Returns ApiRequest

  • Returns ApiRequest

  • Parameters

    Returns Promise<string>

  • Parameters

    • secret: string
    • url: string
    • signatureMethod: TStringSignatureMethod
    • encodeURIMethod: (str: string) => string = EncodeByRFC3986
        • (str: string): string
        • 字符AZ、az、09以及字符 -、_、.、 不编码。

          其它字符编码成%XY的格式,其中XY是字符对应ASCII码的16进制。示例:半角双引号(")对应%22。

          扩展的UTF-8字符,编码成%XY%ZA…的格式。

          空格( )编码成 %20,而不是加号(+)。

          该编码方式与application/x-www-form-urlencoded MIME格式编码算法相似,但又有所不同。

          encodeURIComponent: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/encodeURIComponent Not Escaped: A-Z a-z 0-9 - _ . ! ~ * ' ( )

          !*()' %21 %2A %28 %29 %27

          since

          1.1.6

          version

          2021-12-07

          Parameters

          • str: string

          Returns string

    • decodeURIMethod: (str: string) => string = DecodeByRFC3986
        • (str: string): string
        • since

          1.1.11

          version

          2021-12-07

          Parameters

          • str: string

          Returns string

    Returns Promise<true | ApiRequestVerifyError>

Generated using TypeDoc