简体   繁体   English

Java Spring Boot 如何知道客户端收到来自 API 的响应

[英]Java Spring Boot how to know client receive the response from API

I wanna ask.我想问。 i'm create an API with Java Spring Boot, process then return the response JSON to client, but can i know the client having received the response from the API ?我正在使用 Java Spring Boot 创建一个 API,处理然后将响应 JSON 返回给客户端,但是我能知道客户端收到了来自 API 的响应吗?

Example, the client hit the API then API process client request but the client cancel hit process before API finish the job, automatically process on API still running untill finish maybe send the response but the client not receive the response because timout or cancel例如,客户端命中API然后API处理客户端请求,但客户端在API完成作业之前取消命中过程,自动处理仍在运行的API直到完成可能发送响应但客户端没有收到响应,因为超时或取消

any advice ?有什么建议吗?

一旦 API 收到请求,客户端终止连接或取消请求,在响应成功发送给客户端之前,您会在 API 端看到一个异常,提示客户端已中止连接。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何在 Spring Boot 中持续接收和解析来自 REST API 的 JSON - How to continuously receive and parse the JSON from REST API in spring boot 如何测量从线程池线程调用 api 的响应时间。(java spring 引导) - How to measure response time of an api when it is being called from threadpool thread.( java spring boot) 如何在Spring Boot应用程序中处理来自外部api的较大响应 - How to handle large response from external api in Spring Boot application 如何为 Spring 从源启动微服务生成 rest 客户端 api? - How to generate rest client api for Spring Boot microservice from source? 如何在 Spring Boot 中使用 Java 从 JSON 响应中提取特定部分? - How to extract a specific part from JSON response with Java in Spring Boot? 使用Spring Boot的Rest API不会通过angular向客户端返回数据:产生来自浏览器的404响应 - Rest api using Spring boot not returning data to client via angular: yields 404 response from browser 在 Spring 启动 API 收到一个 urlenconded - Receive an urlenconded in Spring Boot API 如何从docker容器内的java / spring-boot项目运行python脚本(并接收输出)? - How to run python script (and receive output) from java/spring-boot project which is inside a docker container? 如何在Spring Boot Api post方法中接收自定义JSON对象 - How to receive customized JSON Object in Spring boot Api post Method Java套接字客户端无法接收来自C服务器的响应 - Java socket client can't receive response from C server
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM