Rewrite the whole API to support asynchronous requests using requests.