Class ApiRequest

Export

Since

1.1.6

Version

2021-12-09

Constructors

  • Warning: Remove "Action" field since version 1.1.12

    Parameters

    Returns ApiRequest

    Since

    1.1.12

    Version

    2018-10-20

Properties

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

Accessors

  • get EncodeURIMethod(): ((uri) => string)
  • Returns ((uri) => string)

      • (uri): string
      • Parameters

        • uri: string

        Returns string

    Since

    1.1.12

    Version

    2018-10-20

  • get FullUrlWithoutSignature(): string
  • Returns string

    Since

    1.1.17

    Version

    2019-02-20

  • get UrlWithoutSignature(): string
  • Returns string

    Since

    1.1.12

    Version

    2018-10-20

Methods

  • Parameters

    • name: string
    • Optional val: string

    Returns ApiRequest

  • Parameters

    Returns Promise<string>

  • Parameters

    • secret: string
    • url: string
    • signatureMethod: TStringSignatureMethod
    • encodeURIMethod: ((str) => string) = EncodeByRFC3986
        • (str): string
        • RFC3986: https://tools.ietf.org/html/rfc3986

          字符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

          Parameters

          • str: string

          Returns string

          Since

          1.1.6

          Version

          2021-12-07

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

          • str: string

          Returns string

          Since

          1.1.11

          Version

          2021-12-07

    Returns Promise<true | ApiRequestVerifyError>

Generated using TypeDoc