Skip to content

feat!: configurable User-Agent and HTTP engine - #93

Merged
zigzago merged 1 commit into
mainfrom
feat/user-agent-and-engine
Oct 8, 2026
Merged

zigzago merged 1 commit into
mainfrom
feat/user-agent-and-engine

Conversation

@zigzago

@zigzago zigzago commented Oct 8, 2026

Copy link
Copy Markdown
Member
  • add a userAgent parameter to the generated ClientConfiguration, installed with the Ktor UserAgent plugin; its default value is set by the new userAgent generator option
  • add an engine generator option: a fully qualified HttpClientEngineFactory, or "platform" to let Ktor select the engine of each platform (CIO supports HTTPS only on the JVM)
  • KMP projects generated by initApiClientSubproject depend on ktor-client-engine-defaults and use engine = "platform"
  • add the composable httpClientAuthorizationStatements module hook; BasicAuthModule uses it
  • document the browser limitations (User-Agent and Referer)

BREAKING CHANGE: ClientConfiguration has a new userAgent parameter before engine, and defaultHttpClientConfig a new userAgent parameter before httpClientAuthorization: calls passing these arguments by position must be updated.

- add a `userAgent` parameter to the generated ClientConfiguration, installed
  with the Ktor UserAgent plugin; its default value is set by the new
  `userAgent` generator option
- add an `engine` generator option: a fully qualified HttpClientEngineFactory,
  or "platform" to let Ktor select the engine of each platform (CIO supports
  HTTPS only on the JVM)
- KMP projects generated by initApiClientSubproject depend on
  ktor-client-engine-defaults and use engine = "platform"
- add the composable `httpClientAuthorizationStatements` module hook;
  BasicAuthModule uses it
- document the browser limitations (User-Agent and Referer)

BREAKING CHANGE: ClientConfiguration has a new `userAgent` parameter before
`engine`, and defaultHttpClientConfig a new `userAgent` parameter before
`httpClientAuthorization`: calls passing these arguments by position must be
updated.
@sonarqubecloud

sonarqubecloud Bot commented Oct 8, 2026

Copy link
Copy Markdown

@zigzago
zigzago merged commit f94e17c into main Oct 8, 2026
8 checks passed
@zigzago
zigzago deleted the feat/user-agent-and-engine branch October 8, 2026 20:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant