walla
03/14/2019, 7:15 AMgildor
03/14/2019, 7:17 AMwalla
03/14/2019, 7:23 AMJorge Bo
02/25/2022, 1:09 PMoverride suspend fun find(searchAttributes: ProviderApi.SearchAttributes): List<ProviderApi.ItineraryDTO> =
withContext(<http://Dispatchers.IO|Dispatchers.IO>) {
<http://httpClient.post|httpClient.post>("$serverRootUri$RESOURCE_URI") {
contentType(ContentType.parse("application/json"))
body = searchAttributes
}
}
gildor
02/25/2022, 2:37 PMJorge Bo
02/25/2022, 2:38 PMgildor
02/25/2022, 2:40 PMJorge Bo
02/25/2022, 2:42 PMgildor
02/25/2022, 2:45 PMJorge Bo
02/25/2022, 2:48 PMgildor
02/25/2022, 2:48 PMJorge Bo
02/25/2022, 3:07 PMoverride suspend fun find(searchAttributes: ProviderApi.SearchAttributes): List<ProviderApi.ItineraryDTO> {
return coroutineScope {
providers.map {
async {
it.find(searchAttributes)
}
}.awaitAll()
.flatten()
}
}
it.find(searchAttributes) => use Ktor webclient(netty)
gildor
02/25/2022, 3:29 PM