Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[KTOR-6886] Android Http Client using Android's HttpEngine on API 34+ #4013

Draft
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

yschimke
Copy link

@yschimke yschimke commented Mar 31, 2024

Subsystem
Client

Motivation
On Android UrlConnection by default doesn't support HTTP/2, and is an old stack.

HttpEngine is now part of the Android 14 APIs (API 34+), and supports HTTP/2, HTTP/3 and much more advanced features.

Apps can install this as the process singleton URL handler, but this could have other impacts.

Solution

Rather than switching to the very different API HttpEngine, this change minimises the differences by using HttpEngine.openConnection(URL) and otherwise working the same as the existing UrlConnection code.

TODO

  • Cleanup
  • Work out how to run the included but non functional instrumentation test

@yschimke yschimke changed the title [For discussion] Android use HttpEngine UrlFactory on API 14+ [For discussion] Android Http Client using Android's HttpEngine on API 14+ Mar 31, 2024
@yschimke yschimke changed the title [For discussion] Android Http Client using Android's HttpEngine on API 14+ [For discussion] Android Http Client using Android's HttpEngine on API 34+ Apr 1, 2024
@yschimke yschimke changed the title [For discussion] Android Http Client using Android's HttpEngine on API 34+ [KTOR-6886] Android Http Client using Android's HttpEngine on API 34+ Apr 1, 2024
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