Cette page n'est pas encore disponible dans votre langue. Nous nous efforçons d'ajouter d'autres langues. Nous vous remercions de votre compréhension.

On this page

Show all

Preparations for Using the SDK

Updated on 2023-05-24 GMT+08:00
  1. Download the SDK and import it to a local development tool. For details, see Preparation.
  2. Set parameters such as appKey, appSecret, method, and url.
    Table 1 Parameters

    Type

    Description

    Example

    Path parameter

    The path parameter is part of the URL. Use it to replace the parameter in {} in the URL.

    Parameter: param = xxx

    Original URL: http://Domain name/p1/{param}/p2

    Actual URL: http://Domain name/p1/xxx/p2

    Query parameter

    The query parameter is a supplementary part of the URL.

    Parameter: param = xxx

    Parameter 2: param2 = xxx2

    Example 1:

    Add the query parameter to a method (use the SDK of each language as an example).

    Example: request.addQueryStringParam("param"," xxx");

    Example 2:

    Add a question mark (?) and the parameter to the end of the URL. If there are multiple parameters, separate them with ampersands (&).

    Original URL: http://Domain name/p1

    Actual URL: http://Domain name/p1?param=xxx&param2=xxx2

    Header parameter

    The header parameter is part of the request header. The parameter name is case insensitive.

    Parameter: param = xxx

    Add a header parameter to a method or add a header parameter when constructing a request (subject to the SDK of each language).

    Example: request.addHeader("param"," xxx");

    Body parameter

    The request body parameter is a JSON string in the SDK. This parameter is unavailable in earlier versions.

    "{}"

  3. Modify the SDK and obtain the signature parameter Authorization in the request header after the request is signed. In addition, add the x-Authorization parameter with the same value as Authorization. For details about how to obtain the Authorization parameter and add the x-Authorization parameter, see Preparation.
Feedback

Feedback

Feedback

0/500

Selected Content

Submit selected content with the feedback