Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- from apiserver import ApiServer, ApiRoute
- class Myserver(ApiServer):
- @ApiRoute("/popup")
- def addbar(req):
- print(req)
- return {"boo":req["bar"][0]+1}
- @ApiRoute("/baz")
- def justret(req):
- if req :
- raise ApiError(501, "no data in for baz")
- Myserver("172.24.32.43", 8080).serve_forever()
Add Comment
Please, Sign In to add comment