Created
April 7, 2019 13:30
-
-
Save pahill/120862c1613076be3e5dae4b7eb3cf03 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@KtorExperimentalAPI | |
override suspend fun getInspiration(): URL? { | |
val httpClient = HttpClient(CIO) | |
val url = httpClient.get<String?>(INSPIROBOT_URL) | |
return if (url != null) { | |
URL(url) | |
} else { | |
null | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment