The connection AsyncHTTPClient has been closed for you, and the response you get is all the information returned by the server. AsyncHTTPClient已经帮你关闭了,你获得的response就是服务器返回的所有信息。
The reason why closure is needed in other languages is because they are usually only responsible for creating a connection for you. You need to create requests, send data, process responses, read data, and of course related exceptions, and finally close the connection after everything is finished. 🎜
🎜And AsyncHTTPClient is a more advanced encapsulation. You only need to pay attention to what is sent, and then all the intermediate processes are completed by AsyncHTTPClient for you. Finally, you can get the data. 🎜
The connection
AsyncHTTPClient
has been closed for you, and the response you get is all the information returned by the server.AsyncHTTPClient
已经帮你关闭了,你获得的response就是服务器返回的所有信息。其他语言中之所以需要关闭,是因为它们通常只负责帮你创建连接,需要你自己创建请求、发送数据、处理应答、读取数据、当然还有相关异常,最后一切结束后关闭连接。
而
The reason why closure is needed in other languages is because they are usually only responsible for creating a connection for you. You need to create requests, send data, process responses, read data, and of course related exceptions, and finally close the connection after everything is finished. 🎜 🎜AndAsyncHTTPClient
是更高级的封装,你只需要关注发送什么,然后中间过程全部由AsyncHTTPClient
AsyncHTTPClient
is a more advanced encapsulation. You only need to pay attention to what is sent, and then all the intermediate processes are completed byAsyncHTTPClient
for you. Finally, you can get the data. 🎜