March 2019
Beginner
490 pages
12h 40m
English
Tornado includes a class called AsyncHTTPClient, which performs HTTP requests asynchronously. The first thing is to create our application, which will inherit from application. Then, we will run an HTTP server that supports our application. Next, we will indicate in which port we want the server to listen. Finally, we will launch the event loop, which will listen to requests with the IOLoop.current().start() instruction.
In the following example, we are using the fetch method of AsyncHTTPClient, which specifies the method or function that will be called when the HTTP request is complete as a callback parameter. In this example, we specified the on_response method as the callback. Also ...
Read now
Unlock full access