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. Create a DecodeUrlRequest object using DecodeUrlRequest.builder() class by passing all the required parameters.
  2. Call decodeUrl() function using the instance of LMFeedClient.
  3. Process the response LMResponse<DecodeUrlResponse>as per your requirement.
// object of DecodeUrlRequest
let request = DecodeUrlRequest.builder()
.link("https://likeminds.community/") // url of the link to be decoded
.build()
LMFeedClient.shared.decodeUrl(request) { response in
// response (LMResponse<DecodeUrlResponse>)
if (response.success) {
// your function to process the response data
processResponse(response.data)
} else {
// your function to process error message
processError(response.errorMessage)
}
}

Models

DecodeURLRequest

VARIABLETYPEDESCRIPTIONOPTIONAL
urlStringURL of the link to be decoded.

DecodeURLResponse

VARIABLETYPEDESCRIPTIONOPTIONAL
ogTagsOGTagsOG tags to show link preview