headerGStringAppendParam

fun headerGStringAppendParam(string: <Error class: unknown class>, name: String, value: String? = null)

Appends something like name=value to @string, taking care to quote @value if needed, and if so, to escape any quotes or backslashes in @value.

Alternatively, if @value is a non-ASCII UTF-8 string, it will be appended using RFC5987 syntax. Although in theory this is supposed to work anywhere in HTTP that uses this style of parameter, in reality, it can only be used portably with the Content-Disposition "filename" parameter.

If @value is null, this will just append @name to @string.

Parameters

string

a #GString being used to construct an HTTP header value

name

a parameter name

value

a parameter value, or null