decodeUrlContent

The decodeUrlContent API is called by the super app to decode the URL that is generated from a promotion QR code.

Method signature

copy
Future<MiniApiResult<String>> decodeUrlContent(String url);

Request parameters

Field

Data type

Required

Description

url

String

Yes

Indicates the URL content to be decoded.

Response parameters

The response of this API is MiniApiResult<String>. For details, see MiniApiResult.

Sample

It's recommended to use the then method in the following sample codes.

copy
function _decodeUrl(url:string){
  IAPMiniProgram.instance.decodeUrlContent(url).then((result){
    if(result.success){

    }else{

    }
  });
}