canDecodeUrlContent

The canDecodeUrlContent API is called by the super app to verify if the URL can be decoded by Mini Program Platform.

Method signature

copy
+ (BOOL)canDecodeURLContent:(NSString *)urlContent;

Request parameters

Name

Type

Description

Required

url

String

The URL content that is used to check if the URL can be decoded.

M

Response parameters

Type

Length

Description

Required

Boolean

/

The decoding result.

M

Sample

The following sample shows how to call the canDecodeUrlContent API.

copy
BOOL canDecode = GRVURLContentDecoder.canDecodeURLContent(uriContent);
if(canDecode) {
    //following code is like
    //GRVURLContentDecoder.decodeURLContent(uriContent, completionHandler)
} else {
    //other logic 
}