-
-
Notifications
You must be signed in to change notification settings - Fork 271
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
Add WebSocket Support #114
Comments
Thank you for your kind words. If you are referring to websocket support, it has to be implemented in the upstream project first, see lwthiker/curl-impersonate#157 for more details. |
Hello, looks like upstream support has been added. Any update on this? Love the project btw |
Preliminary support for websocket can be found here, download and install the wheels. No tests has been added yet, bugs are expected. import asyncio
from curl_cffi import requests
with requests.Session() as s:
w = s.connect("ws://localhost:8765")
w.send(b"Foo")
reply = w.recv()
print(reply)
assert reply == b"Hello Foo!"
async def async_examples():
async with requests.AsyncSession() as s:
w = await s.connect("ws://localhost:8765")
await w.asend(b"Bar")
reply = await w.arecv()
print(reply)
assert reply == b"Hello Bar!"
asyncio.run(async_examples()) |
Experimental websockets support has been added since 0.6.0b7, see the examples folder for more details. |
you are doing an excellent job congratulations with all my heart you saved part of a business I have here please provide a crypto wallet so I can repay your favor with a donation, I would like to know if it is possible to use websocket.WebSocketApp together with your code
The text was updated successfully, but these errors were encountered: