Merge: app.nit: update AsyncHttpRequest API, add examples and a simple implementation
This PR updates the API of `AsyncHttpRequest`, using more general names for methods and adding a new variation point `uri`. The useful `uri_root` and `uri_tail` are still available as they are more practical to factorize code in real programs. Also provide the `http_status_code` to callbacks when the request succeeded.
Fix a few bugs: correct the ordering of the callback to the UI thread, and join the thread from the UI thread after request is completed.
Intro the new `SimpleAsyncHttpRequest` which prints feedback to the console on errors. It can be used when the response from the server is ignored, or as a quick and dirty first version in the prototype.
Pull-Request: #2188
Reviewed-by: Jean Privat <jean@pryen.org>
Reviewed-by: Lucas Bajolet <r4pass@hotmail.com>