tylerwilson
05/28/2019, 11:43 PMjava.lang.IllegalStateException: Cannot modify a builder when final structure has already been built
. Is there a way to do this? Any examples out there I may refer to? Thank you.Shawn
05/29/2019, 2:48 AMURLBuilder
source, and it seems like your issue is really with the ParametersBuilder that extends StringValuesBuilder (https://github.com/ktorio/ktor/blob/master/ktor-utils/common/src/io/ktor/util/StringValues.kt#L237) rather than the URLBuilder. You very well might need to extract the parameters from the ParametersBuilder using maybe toMap()
or flattenEntries()
or something, create a new collection with the params you need to add, then create a new, unbuilt ParametersBuilder using the pairs. Then perhaps pass that ParametersBuilder to a new URLBuilder instance with the appropriate valuesShawn
05/29/2019, 2:48 AMShawn
05/29/2019, 2:49 AMe5l
05/29/2019, 6:20 AMtylerwilson
05/29/2019, 2:01 PM