falconry / falcon

The no-magic web data plane API and microservices framework for Python developers, with a focus on reliability, correctness, and performance at scale.
https://falcon.readthedocs.io/en/stable/
Apache License 2.0
9.51k stars 937 forks source link

docs(user): improve WS tutorial #2257

Closed CaselIT closed 1 month ago

CaselIT commented 2 months ago

Some improvements to the ws tutorial

Fixes: #2255 Fixes: #2256

codecov[bot] commented 2 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 100.00%. Comparing base (262129a) to head (20976aa).

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #2257 +/- ## ========================================= Coverage 100.00% 100.00% ========================================= Files 63 63 Lines 6849 6849 Branches 1260 1260 ========================================= Hits 6849 6849 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

CaselIT commented 2 months ago

@vytas7 I've added an interface only to the simpler echo ws endpoint, since I did not want to overcomplicate the html.

Let me know if you think it's enough

CaselIT commented 2 months ago

note to self: we should probably replace or integrate the link at https://github.com/falconry/falcon/blob/cbca63dc7739720eab856f48b32f9e782438be7a/falcon/asgi/ws.py#L239

with https://developer.mozilla.org/en-US/docs/Web/API/CloseEvent/code

CaselIT commented 1 month ago

the tutorial directory is called wslook, but in the tutorial itself it is called differently.

Do you habe a suggestion regarding the new name?

vytas7 commented 1 month ago

the tutorial directory is called wslook, but in the tutorial itself it is called differently.

Do you habe a suggestion regarding the new name?

I don't have a particular preference, I just find it a bit confusing and error-prone that the same directory is called wslook in our repository, and asyncws in the tutorial itself.

CaselIT commented 1 month ago

makes sense. will think what of the two names makes more sense