REST client appears broken on 0.6.0 dev versions
See original GitHub issue@Path("")
public interface UserService {
@Path("login")
@POST
void login(LoginBody body);
}
...
UserService r = RESTClient.factory(UserService.class).createResource("");
BackgroundWorker worker = new BackgroundWorker();
worker.run(() -> {
try {
// Should make a POST request to /login with JSON body
r.login(new LoginBody("bob", "bob"));
} catch (Exception e) {
e.printStackTrace();
}
});
Results in:
The core issue is actually not a Java exception; rather, it’s a JavaScript error from within standard library RequestImpl
code, hence why it provides no description of what the error is. The REST client attempts, in 0.6.0-dev-816, to call a JS function that does not exist (otfri_RequestImpl_send0
), and it fails with the JavaScript error otfri_RequestImpl_send0 is not defined
. The only way I’ve been able to fix this is to roll back to Java 8 + TeaVM 0.5.1, which fixes the problem.
Issue Analytics
- State:
- Created 4 years ago
- Comments:5 (2 by maintainers)
Top Results From Across the Web
ruby on rails - API request not working with rest-client but ...
This request works fine with cURL or Faraday gem, but not working well with rest-client gem. The testing request results are below:.
Read more >Errors during bundle install phase of `gdk install` - GitLab.org
I think I just confirmed that this is reproducible locally by: upgrading bundler gem install bundler to 1.15.0; gem uninstall omniauth-google- ...
Read more >Upgrade Guides | Nomad - HashiCorp Developer
Despite this being a bug fix, it is considered a significant enough change in behavior to ... Nomad versions since v0.9 have incorrectly...
Read more >Release Notes | Mimestream
“Cocoa Error 132001” sometimes appears when deleting a label or removing an ... Fix light scrollbar in release notes when using dark mode...
Read more >Oracle Critical Patch Update Advisory - October 2021
Oracle Communications Calendar Server, version 8.0.0.6.0 ... Both approaches may break application functionality, so Oracle strongly recommends that ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
A new release coming soon! Very exciting…
Our large TeaVM/Flavour-based project just went live. We use a lot of Flavour’s features. Thanks for creating and maintaining it!
We will test with the new versions. It sounds like we will need to add tome new annotations to make it work.
@konsoletyper Sorry for the late response - you are correct that switching to Flavor 0.2.0-dev-70 fixes the problem. Thanks!