Hi, how can I use `Parameters.build` now that `Str...
# ktor
m
Hi, how can I use
Parameters.build
now that
StringValuesBuilder
is internal? My use case is sending a request that has
application/x-www-form-urlencoded
data. Using this:
Copy code
FormDataContent(Parameters.build {
    append("some", "thing")
})
results in a warning (and an error in my case since I'm using
-Werror
) on the
append
call.
This API is internal in ktor and should not be used. It could be removed or changed without notice.
This is because
StringValuesBuilder
is marked with
@InternalAPI
, andd using it is required for doing basically any building for parameters. Is it now impossible to use
FormDataContent
without relying on Ktor's internals?
l
Not quite sure why you need the
FormDataContent
- but anyway it looks like you can use
Parameters
factories now i.e.
parametersOf()
a
@Matthieu Stombellini just add
@OptIn(InternalAPI::class)
for now. For more information please read https://youtrack.jetbrains.com/issue/KTOR-3001#focus=Comments-27-5105259.0-0.