Daniel Felipe Henao Toro
02/10/2023, 3:40 PMprivate fun <T> buildBody(parameters: T) =
jacksonObjectMapper()
.convertValue<Map<String, String>>(parameters!!)
.let {
LinkedMultiValueMap<String, String>().apply {
setAll(it)
}
}
Luke Armitage
02/10/2023, 3:42 PMDaniel Felipe Henao Toro
02/10/2023, 3:42 PMphldavies
02/10/2023, 4:16 PMparameters
cannot be null (it will throw when it is, using the !!
) You can use <T: Any>
to enforce it at compile time and avoid the need to use !!
Daniel Felipe Henao Toro
02/10/2023, 7:07 PM