Comments (7)
Ok, so right now I have a general implementation where you can send one message or multiple messages until you close it with exit().
Example call for now is:
https WSS ws://127.0.0.1:8000/ws
Now I would ask for some advice/guideance on how the maintainers would like the implementation to be plugged in.
As for now, I have plugged it in the collect_messages()
where I read if the method is WSS and then branch it out to go to a function to create a websocket connection and then another function that reads user input in a while loop sends it and waits for another message until the user types in exit()
. In the meantime we have a thread that sends pings to keep the connection alive. Now I would have to implement models and leverage the argsparser better.
The question for now is, do I try to plug it into the present client and request handler or do we separate it as websockets are handled differently anyway.
This is the branch https://github.com/valentin994/cli/tree/websocket-support
It is quite crude for now as I am not sure what way we want to go with this.
from httpie.
Would really need this one too!
from httpie.
sounds great, would be willing to help with this if needed
from httpie.
This would be fantastic!
from httpie.
That would be a great feature. Thank you.
from httpie.
So I started fiddling with it but I would like some pointers from the maintainer on how they would like this implemented.
The request to send requests isn't hard to implement but there are some ways it could be done. Do we want to implement it in a way where someone could specify the number of messages they want to send, what flags should it support, and what should one showcase after a successful connection, I suppose all headers?
As for receiving messages that would be just opening a connection to the wss and listening for messages?
from httpie.
I think we should be aiming at something similar to websocat
from httpie.
Related Issues (20)
- unsure about zabbix plugin
- Debian package shouldn't depend on Python HOT 1
- Configure simple --json
- [question] multiline request
- Display used server IP in verbose mode HOT 4
- ImportError: cannot import name 'DEFAULT_CIPHERS' from 'urllib3.util.ssl_' HOT 3
- Way to construct and print an URL HOT 6
- HttpPie decompress the response which was compressed by gzip automatically.
- decompress compressed data HOT 10
- Add support for HTTP/2, HTTP/3, System CA, OCSP Revocation HOT 3
- Support for team collaboration/sync HOT 3
- Not able to import collection from postman HOT 1
- Average speed is reported incorrectly for resumed downloads HOT 1
- How to remove DEFAULT_UA? HOT 1
- Default to localhost HOT 2
- Allow XDG_CONFIG_HOME usage also on Windows
- More statuses support HOT 1
- Unable to install httpie via Chocolatey HOT 14
- [macOS] Lag when piping stdout HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from httpie.