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

Add java.net.http package components to java2script. #227

Open
warownia1 opened this issue Jan 20, 2022 · 1 comment
Open

Add java.net.http package components to java2script. #227

warownia1 opened this issue Jan 20, 2022 · 1 comment

Comments

@warownia1
Copy link

warownia1 commented Jan 20, 2022

Java 11 introduced java.net.http package that adds fully functional http client to the standard library. It would be really nice to have it in java2script.
Here are some of the benefits of adding java.net.http to java2script:

  • everyone has it, no extra dependencies needed
  • no need to maintain and update it by yourself
  • current javajs.http client has very limited functionality
  • applications and libraries that want to support java2script could use java's native client instead of having hard dependency on javajs.http.HttpClient
@warownia1 warownia1 changed the title Add java.http package components to java2script. Add java.net.http package components to java2script. Jan 25, 2022
BobHanson added a commit that referenced this issue Nov 28, 2023
5.0.1 integration of Jmol legacy transpiler (4.2) and SwingJS transpiler
@BobHanson
Copy link
Owner

@warownia1

Mateusz,

			if (!method.equals(METHOD_HEAD))
				conn.setDoInput(true);

I think true is just the default value, so this does nothing. I noticed recently that HEAD with setDoInput(false) gives no headers. But presumably with setDoInput(true) HEAD still does not send content or open a stream.

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

No branches or pull requests

2 participants