Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enhancement: Add MessagePack support and generator methods to WebSocket #1626

Merged
merged 2 commits into from May 8, 2023

Conversation

provinzkraut
Copy link
Member

@provinzkraut provinzkraut commented May 7, 2023

Add the following methods to WebSocket:

  • send_msgpack: Send data as MessagePack
  • receive_msgpack: Receive data and decode as MessagPack
  • iter_data: an async generator over data supporting text and binary
  • iter_json: Like iter_data but decodes data as JSON
  • iter_msgpack: Like iter_data but decodes data as MessagePack and only supports binary mode

Add the following methods to WebSocketTestSession:

  • send_msgpack: Send data as MessagePack
  • receive_msgpack: Receive data and decode as MessagPack

Pull Request Checklist

  • New code has 100% test coverage
  • (If applicable) The prose documentation has been updated to reflect the changes introduced by this PR
  • (If applicable) The reference documentation has been updated to reflect the changes introduced by this PR

Description

Close Issue(s)

@provinzkraut provinzkraut requested a review from a team as a code owner May 7, 2023 13:47
@sonarcloud
Copy link

sonarcloud bot commented May 8, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

94.7% 94.7% Coverage
0.0% 0.0% Duplication

litestar/serialization.py Outdated Show resolved Hide resolved
@provinzkraut provinzkraut merged commit fd54ce5 into main May 8, 2023
5 of 7 checks passed
@provinzkraut provinzkraut deleted the ws-iter-data branch May 8, 2023 09:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants