poppy/cdn/transport/falcon/hosts.py

19 lines
475 B
Python

import falcon
class HostsResource:
def on_get(self, req, resp):
"""Handles GET requests
"""
resp.status = falcon.HTTP_200 # This is the default status
resp.body = [
{
'hostname': 'www.mywebsite.com',
'description': 'My Sample Website'
},
{
'hostname': 'www.myotherwebsite.com',
'description': 'My Other Website'
}
]