Skip to content

[WIP] Add java.net.HttpURLConnection to JavaNet#782

Merged
ktoso merged 1 commit into
swiftlang:mainfrom
marcprux:patch-1
Jun 10, 2026
Merged

[WIP] Add java.net.HttpURLConnection to JavaNet#782
ktoso merged 1 commit into
swiftlang:mainfrom
marcprux:patch-1

Conversation

@marcprux

@marcprux marcprux commented Jun 9, 2026

Copy link
Copy Markdown
Contributor

java.net.HttpURLConnection is very useful because it provides access to the Android-native HTTP connection handling APIs.

Leaving as draft for discussion.

@ktoso

ktoso commented Jun 9, 2026

Copy link
Copy Markdown
Collaborator

Yeah that’s a good one, agreed.

are we missing much of its api surface though or did it import all we need already? (What other types do we need to add)

@marcprux

Copy link
Copy Markdown
Contributor Author

are we missing much of its api surface though or did it import all we need already? (What other types do we need to add)

I think we have almost everything we need. The Java 8 docs for HttpURLConnection only reference InputStream, which I think it already there. The only other one is java.security.Permission, which doesn't do anything on Android (or anywhere else we are likely to be targeting, I expect).

@ktoso

ktoso commented Jun 10, 2026

Copy link
Copy Markdown
Collaborator

Yeah Permissions isn't too exciting I guess AFAIK? We're missing getHeaderFields which might be a nice one to have, I'll follow up on it here.

@ktoso

ktoso commented Jun 10, 2026

Copy link
Copy Markdown
Collaborator

Meh, this reminds me we should make wrap-java more repeatable, it causes a huge diff now due to unordered member rendering in generated sources... I'll get this landed, thanks for the idea @marcprux !

@ktoso

ktoso commented Jun 10, 2026

Copy link
Copy Markdown
Collaborator

I'll merge this and follow up with regeneration and some CI changes

@ktoso ktoso marked this pull request as ready for review June 10, 2026 08:19
@ktoso ktoso self-requested a review as a code owner June 10, 2026 08:19
@ktoso ktoso merged commit ca095da into swiftlang:main Jun 10, 2026
41 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