Skip to content

Instantly share code, notes, and snippets.

@li2
Created January 9, 2024 22:55
Show Gist options
  • Save li2/f32b90da96e6c1dba1c1e2221c295904 to your computer and use it in GitHub Desktop.
Save li2/f32b90da96e6c1dba1c1e2221c295904 to your computer and use it in GitHub Desktop.
Ktor headers case-insensitive, set append
headers {
set("header-abc", "abc")
set("header-ABC", "ABC")
append("header-xyz", "xyz")
append("header-XYZ", "XYZ")
}
2024-01-10 11:53:39.983 [outine#6] INFO io.ktor.client.HttpClient
- REQUEST: https://ktor.io/docs/welcome.html
METHOD: HttpMethod(value=GET)
COMMON HEADERS
-> Accept: application/json
-> Accept-Charset: UTF-8
-> header-abc: ABC
-> header-xyz: xyz; XYZ
CONTENT HEADERS
-> Content-Length: 0
BODY Content-Type: null
BODY START
BODY END
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment