How to disable schema validation?¶
Validating requests is costly - roughly 40% of dispatching time is spent on schema validation. If you know the incoming requests are valid, you can disable the validation for better performance.
dispatch(request, validator=lambda _: None)
Which HTTP status code to respond with?¶
200 if response else 204
If the request was a notification,
dispatch will give you an empty string. So
since there’s no http body, use status code 204 - no content.
How to rename a method¶
Or use dispatch function’s methods parameter.
How to get the response in other forms?¶