Skip to content

v0.14.0 - Added custom response objects

Choose a tag to compare

@sansyrox sansyrox released this 03 Mar 00:42
· 652 commits to main since this release

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"}