Yet Another WebIOPi+
 All Classes Namespaces Files Functions Variables Macros Pages
rest.py
Go to the documentation of this file.
1 def request(method="GET", path="", data=None):
2  def wrapper(func):
3  func.routed = True
4  func.method = method
5  func.path = path
6  func.data = data
7  return func
8  return wrapper
9 
10 def response(fmt="%s", contentType="text/plain"):
11  def wrapper(func):
12  func.format = fmt
13  func.contentType = contentType
14  return func
15  return wrapper
16 
17 def macro(func):
18  func.macro = True
19  return func