How to make an make a web request in an async manner

后端 未结 3 709
别跟我提以往
别跟我提以往 2020-12-12 03:23

I need to make a web request to a RESTful server from Java. I would like for my Java code to handle the response asynchronously. I am looking for a framework which handles t

3条回答
  •  不思量自难忘°
    2020-12-12 04:20

    Check out the ning async http client project on GitHub. It gives you the option to use a Future or to define a callback for when the request completes:

    https://github.com/sonatype/async-http-client

提交回复
热议问题