Robyn supports custom response objects now! 🥳
What's Changed
Full Changelog: v0.13.1...v0.14.0
Example
@app.get("/")
async def hello(request):
global callCount
callCount += 1
message = "Called " + str(callCount) + " times"
print(message, request)
return {"status_code": "200", "body": "hello", "type": "text"}
@app.get('/404')
def return_404():
return {"status_code": "404", "body": "hello", "type": "text"}