Skip to main content

Decode URL

Parses and decodes a URL string, providing the original URL components such as protocol, host, path, and query parameters for further processing or display.

Steps to Decode URL

  1. Use the decodeUrl() function provided by the lmFeedClient object created earlier.
  2. Create an instance of DecodeUrlRequest, as shown in the snippet and pass it to the above method.
  3. Use the response as per your requirement
try {
const decodeUrlRequest = DecodeUrlRequest.builder()
.setLink("https://likeminds.community/") // url of the link to be decoded
.build();
const response = await lmFeedClient.decodeUrl(decodeUrlRequest);
// Use the response as per your requirement.
} catch (error) {
// Use the error as per your requirement.
}

Models

DecodeURLRequest

VARIABLETYPEDESCRIPTIONOPTIONAL
urlstringURL of the link to be decoded.

DecodeURLResponse

VARIABLETYPEDESCRIPTIONOPTIONAL
ogTagsOGTagsOG tags to show link preview