Skip to content

Conversation

@utamori
Copy link
Contributor

@utamori utamori commented Dec 29, 2025

Summary

  • Add io.ktor:ktor-http dependency (3.3.3)
  • Replace java.net.URL with io.ktor.http.Url in HTTPRequest
  • Replace java.net.URI with io.ktor.http.Url in ProtocolClientConfig
  • Update ProtocolClient and ConnectInterceptor to use Ktor URLBuilder
  • Add URL scheme validation (http/https only) for fail-fast behavior
  • Update okhttp module to convert Ktor Url to String for OkHttp

This prepares for Kotlin Multiplatform support (Issue #140).

Behavioral Notes

  • Invalid URL schemes (e.g., xhtp://) now throw IllegalArgumentException at config creation time (fail-fast), instead of MalformedURLException at first RPC call

Test plan

  • All 99 library tests pass
  • Full build succeeds
  • Example apps build successfully

🤖 Generated with Claude Code

Copy link
Member

@jhump jhump left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@utamori, thanks for the PR!

Like the other one I commented on, some changes are needed to get the lint CI check green and to also make the DCO check green. The latter requires signing off on each commit. I put more details in remarks in your other PR (here).

I've also left two remarks -- one a tiny style nit, the other a request to improve the behavior (and add a test) in code that you had to refactor.

@utamori utamori force-pushed the feat/kmp-phase3-ktor-url branch 2 times, most recently from 65f0b0f to 6645325 Compare January 7, 2026 11:02
@jhump
Copy link
Member

jhump commented Jan 8, 2026

@utamori, looks like this needs to be rebased now that your other PR has been merged.

@utamori utamori force-pushed the feat/kmp-phase3-ktor-url branch from 2beaf93 to 904901f Compare January 9, 2026 02:08
- Add io.ktor:ktor-http dependency (3.3.3)
- Replace java.net.URL with io.ktor.http.Url in HTTPRequest
- Replace java.net.URI with io.ktor.http.Url in ProtocolClientConfig
- Update ProtocolClient to use Ktor URLBuilder
- Update ConnectInterceptor to use Ktor URLBuilder
- Add URL scheme validation (http/https only) for fail-fast behavior
- Update okhttp module to convert Ktor Url to String for OkHttp

This prepares for Kotlin Multiplatform support (Issue connectrpc#140).

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
Signed-off-by: utamori <mori_yuta@retail-ai.jp>
@utamori utamori force-pushed the feat/kmp-phase3-ktor-url branch from 904901f to 77b8583 Compare January 9, 2026 04:11
@jhump jhump merged commit 77b8205 into connectrpc:main Jan 9, 2026
7 checks passed
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.

2 participants