问题标签 [helidon-httpclient]

For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.

0 投票
2 回答
143 浏览

helidon - Helidon的WebClientRequestBuilder中的request()和submit()有什么区别?

HelidonWebClientRequestBuilder有两个类似的 API:request()submit(). 两个 API 都返回Single<WebClientResponse>.

request()的 Javadoc 说……

执行准备好的请求,而不期望收到任何特定类型。响应不会被转换并且返回的 CompletionStage 会被通知。

submit()的 Javadoc 说……

执行准备好的请求。收到响应时,不会将其转换为任何其他特定类型并通知返回的 CompletionStage。

这两个 API 有什么区别?是否只是request()添加了通配符Accept标头而submit()没有?

0 投票
1 回答
92 浏览

helidon - helidon 是否支持 HTTP2?

我想开始在我们目前基于 Spring Boot 的项目中使用 Helidon。想知道 Helidon MP 或 Helidon SE 是否支持 HTTP2 服务器和客户端?

0 投票
1 回答
130 浏览

helidon - io.helidon.webserver.ServerResponse.send() 在服务器上抛出错误但文件在前端下载

尝试为服务器中的(文件上传和下载)错误编写一个示例。虽然它在前端下载文件,但在服务器中出现错误。

对于路由——

2021 年 7 月 29 日下午 6:20:36 io.helidon.webserver.RequestRouting$RoutedRequest defaultHandler 警告:默认错误处理程序:遇到未处理的异常。java.util.concurrent.ExecutionException:遇到此异常的未处理“原因”。在 io.helidon.webserver.RequestRouting$RoutedRequest.defaultHandler(RequestRouting.java:397) 在 io.helidon.webserver.RequestRouting$RoutedRequest.nextNoCheck(RequestRouting.java:377) 在 io.helidon.webserver.RequestRouting$RoutedRequest.next (RequestRouting.java:420) 在 io.helidon.webserver.jersey.ResponseWriter.failure(ResponseWriter.java:133) 在 org.glassfish.jersey.server.ServerRuntime$Responder.process(ServerRuntime.java:438) 在 org. glassfish.jersey.server.ServerRuntime$1.run(ServerRuntime.java:263) 在 org.glassfish.jersey.internal.Errors$1.call(Errors.java:248) 在 org.glassfish.jersey。1128) 在 java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) 在 java.base/java.lang.Thread.run(Thread.java:834) 引起:io.helidon .common.http.AlreadyCompletedException:响应状态代码和标头已经完成(发送到客户端)!在 io.helidon.webserver.HashResponseHeaders$CompletionSupport.runIfNotCompleted(HashResponseHeaders.java:384) 在 io.helidon.webserver.HashResponseHeaders.httpStatus(HashResponseHeaders.java:251) 在 io.helidon.webserver.Response.status(Response.java :122) 在 io.helidon.webserver.Response.status(Response.java:48) 在 io.helidon.webserver.jersey.ResponseWriter.writeResponseStatusAndHeaders(ResponseWriter.java:81) 在 org.glassfish.jersey.server.ServerRuntime$ Responder.writeResponse(ServerRuntime.java:607) 在 org.glassfish.jersey.server.ServerRuntime$Responder。

2021 年 7 月 29 日下午 6:20:36 io.helidon.webserver.RequestRouting$RoutedRequest defaultHandler 警告:无法对 throwable 执行错误处理(请参阅此异常的原因),因为标头已发送 java.lang.IllegalStateException:标头已发送. 无法处理此异常的原因。在 io.helidon.webserver.RequestRouting$RoutedRequest.defaultHandler(RequestRouting.java:405) 在 io.helidon.webserver.RequestRouting$RoutedRequest.nextNoCheck(RequestRouting.java:377) 在 io.helidon.webserver.RequestRouting$RoutedRequest.next (RequestRouting.java:420) 在 io.helidon.webserver.jersey.ResponseWriter.failure(ResponseWriter.java:133) 在 org.glassfish.jersey.server.ServerRuntime$Responder.process(ServerRuntime.java:438) 在 org. glassfish.jersey.server.ServerRuntime$1.run(ServerRuntime.java:263) 在 org.glassfish.jersey.internal.Errors$1。ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) 在 java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) 在 java.base/java.lang.Thread.run(Thread.java: 834)原因:io.helidon.common.http.AlreadyCompletedException:响应状态代码和标头已经完成(发送到客户端)!在 io.helidon.webserver.HashResponseHeaders$CompletionSupport.runIfNotCompleted(HashResponseHeaders.java:384) 在 io.helidon.webserver.HashResponseHeaders.httpStatus(HashResponseHeaders.java:251) 在 io.helidon.webserver.Response.status(Response.java :122) 在 io.helidon.webserver.Response.status(Response.java:48) 在 io.helidon.webserver.jersey.ResponseWriter.writeResponseStatusAndHeaders(ResponseWriter.java:81) 在 org.glassfish.jersey.server.ServerRuntime$ Responder.writeResponse(ServerRuntime.java:607) 在 org.