MJegorovas
04/28/2022, 11:01 AMheaders.append
have a method with HeaderValueWithParameters
as second parameter and other append*
don't? If only append
should have this, then this doc needs to be fixed: https://api.ktor.io/ktor-client/ktor-client-core/io.ktor.client.plugins/-default-request/index.html (see "usage" box).Aleksei Tirman [JB]
04/28/2022, 11:15 AMappend(name: String, value: HeaderValueWithParameters)
the append(name, value.toString())
is called so you can use the toString
method in your code:
val headers = HeadersBuilder()
headers.append("", ContentType("application", "json"))
headers.appendIfNameAbsent("", ContentType("application", "json").toString())
Feel free to file a feature request if you think that having those overloads is necessary in Ktor.MJegorovas
04/28/2022, 11:17 AMAleksei Tirman [JB]
04/28/2022, 11:39 AM