-
Notifications
You must be signed in to change notification settings - Fork 1
Late ktor json plugin installation fails for iOS #1
Copy link
Copy link
Open
Description
Installing the JSON plugin to Ktor HttpClient after it's been initialized doesn't seem to take effect on iOS resulting in parsing failure.
Installing the JSON plugin directly in HttpClient's initializer block works fine:
https://github.com/libec/ynab-kmm-api/blob/f29a2afdb96b15b9a1d2e21dd0a031436db22a52/shared/src/commonMain/kotlin/scopes/Scopes.kt#L52-L60
HttpClient {
install(ContentNegotiation) {
json(makeJsonNegotiation())
}
}Registering HttpClient in Koin and installing JSON plugin later in NetworkClient's init cases parsing failures on iOS
factory<HttpClient> { HttpClient() }
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels