I am using sanic to create a API server but I can't find how to get the hostname on the docs.
Is there a reference of getting the hostname in sanic?
What you want is actually in the documentation:
https://sanic.readthedocs.io/en/latest/sanic/request_data.html