Kotlin-Link-Parser
Kotlin-Link-Parser copied to clipboard
Link preview for android
- remove logic to remove `unshortUrl` as Jsoup does it internally - use `content.url` for original URL & `content.finalUrl` for final URL after redirection - update sample with an example...
```kotlin var urlConn = connectURL(url) urlConn.headerFields var finalResult = urlConn.url.toString() urlConn = connectURL(finalResult) urlConn.headerFields ``` If there is a reason for this, there should be comments
```kotlin getCode(url) .subscribeOn(Schedulers.io()) .subscribe(...) ``` This subscription should be managed, otherwise you could end up with a leak if this operation takes longer than expected in real use.