bananaml / potassium

An HTTP serving framework by Banana
Apache License 2.0
97 stars 9 forks source link

adds the set_context method to app #19

Closed erik-dunteman closed 1 year ago

erik-dunteman commented 1 year ago

What is this?

a set_context method, which overwrites context from the handler

Why?

for users who want to persist objects between handlers, without using hacky global vars

How did you test it works without regressions?

Ran it across multiple calls

If this is a new feature what may a critical error (P0) look like?

Not a P0, but a P2ish error may me users getting confused and erasing their own contexts, or forgetting that a modified context is only on that specific replica