Python
Function declaration
def endpoint(req):
return "Hello World"{
"method": "",
"path": "",
"body": {},
"headers": {},
"query": {}
}Restrictions
Example
Last updated
def endpoint(req):
return "Hello World"{
"method": "",
"path": "",
"body": {},
"headers": {},
"query": {}
}Last updated
from utils.py import get, set, log
#for utils.py look at API reference- Python
def endpoint(req):
count = get("count")
if count==None:
count = 0
else:
count = str(count)
count = count + 1
set("count", str(count))
log("visit count of the API is "+str(count))