Skip to content

feat: support external HttpClient via IO.Options#33

Merged
Piasy merged 1 commit intomainfrom
feat/issue-22-external-http-client
Apr 13, 2026
Merged

feat: support external HttpClient via IO.Options#33
Piasy merged 1 commit intomainfrom
feat/issue-22-external-http-client

Conversation

@Piasy
Copy link
Copy Markdown
Member

@Piasy Piasy commented Apr 13, 2026

Summary

  • add optional httpClient field on socket options (Transport.Options, inherited by IO.Options)
  • propagate the optional external client when creating transports
  • reuse provided client in DefaultHttpClientFactory for polling and websocket transports
  • document usage in README and note WebSockets plugin requirement when websocket transport is enabled
  • add a JVM unit test to verify options propagate external client to transport

Verification

  • ./gradlew :kmp-socketio:jvmTest --tests com.piasy.kmp.socketio.engineio.EngineSocketTest --no-daemon

Closes #22

@github-actions
Copy link
Copy Markdown

Overall Project 94.05% -0.07%
Files changed 93.9%

File Coverage
Transport.kt 100%
PollingXHR.kt 97.52%
WebSocket.kt 96.08%
EngineSocket.kt 95.94% -0.21%
transport.kt 94.74% -0.75%

@Piasy Piasy merged commit d4c2021 into main Apr 13, 2026
4 checks passed
@Piasy Piasy deleted the feat/issue-22-external-http-client branch April 13, 2026 23:40
github-actions Bot pushed a commit that referenced this pull request Apr 13, 2026
Co-authored-by: Piasy Xu <linke.r@bytedance.com> d4c2021
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.

Ktor Plugin support

1 participant